[pacman-dev] [PATCH] pacman.conf: Fixup the XferCommand example for curl

Luke Shumaker lukeshu at lukeshu.com
Sun Jun 3 20:01:32 UTC 2018


From: Luke Shumaker <lukeshu at parabola.nu>

 1. Without `-L`, curl doesn't follow redirects.  This is different than
    both the default behavior of pacman, and from the wget example.  So add
    `-L`.

 2. It uses `-C -` to supposedly allow resuming partial downloads; but that
    doesn't work if we use `> %o` to direct the output to the file.
    Instead, use `-o %o` so that `-C -` actually works.

Signed-off-by: Luke Shumaker <lukeshu at parabola.nu>
---
 etc/pacman.conf.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/etc/pacman.conf.in b/etc/pacman.conf.in
index 53071e52..8e967fbb 100644
--- a/etc/pacman.conf.in
+++ b/etc/pacman.conf.in
@@ -16,7 +16,7 @@
 #GPGDir      = @sysconfdir@/pacman.d/gnupg/
 #HookDir     = @sysconfdir@/pacman.d/hooks/
 HoldPkg     = pacman glibc
-#XferCommand = /usr/bin/curl -C - -f %u > %o
+#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
 #XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
 #CleanMethod = KeepInstalled
 #UseDelta    = 0.7
--
2.17.1


More information about the pacman-dev mailing list