diff mbox

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

Message ID 20180603200132.4020-1-lukeshu@lukeshu.com
State Accepted, archived
Headers show

Commit Message

Luke Shumaker June 3, 2018, 8:01 p.m. UTC
From: Luke Shumaker <lukeshu@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@parabola.nu>
---
 etc/pacman.conf.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.17.1

Comments

Allan McRae June 4, 2018, 11:31 a.m. UTC | #1
On 04/06/18 06:01, Luke Shumaker wrote:
> From: Luke Shumaker <lukeshu@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@parabola.nu>
> ---


OK.

Allan
diff mbox

Patch

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