2008/3/1, Roman Kyrylych <roman.kyrylych@gmail.com>:
2008/2/12, Dan McGee <dpmcgee@gmail.com>:
From 1196a6b6a97c17027608d6c92a3df647deab114c Mon Sep 17 00:00:00 2001 From: Roman Kyrylych <roman@archlinux.org> Date: Sun, 10 Feb 2008 18:56:47 +0200 Subject: [PATCH] makepkg: Support for resuming source downloads
download to *.part and remove the suffix if successful, thus md5sums will be checked only for complete files, and next time makepkg will resume downloading of partial file instead of complaining about invalid md5sums
Signed-off-by: Roman Kyrylych <roman@archlinux.org> --- doc/makepkg.conf.5.txt | 3 +++ etc/makepkg.conf.in | 10 +++++----- scripts/makepkg.sh.in | 13 ++++++++++++- 3 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/doc/makepkg.conf.5.txt b/doc/makepkg.conf.5.txt index f6e4b38..ec72e29 100644 --- a/doc/makepkg.conf.5.txt +++ b/doc/makepkg.conf.5.txt @@ -37,6 +37,9 @@ Options well; the download URL is placed on the end of the command. This is more flexible than the former `FTPAGENT` variable, as any protocol can have a download agent. Several examples are provided in the default makepkg.conf. + All instances of `%u` will be replaced with the download URL. If present, + instances of `%o` will be replaced with the local filename, plus a ``.part'' + extension, which allows yo do file resumes properly.
Typo, but no big deal. :P
index d808270..e8ac6a1 100644 --- a/etc/makepkg.conf.in +++ b/etc/makepkg.conf.in @@ -8,11 +8,11 @@ # #-- The download utilities that makepkg should use to acquire sources # Format: 'protocol::agent' -DLAGENTS=('ftp::/usr/bin/wget -c --passive-ftp -t 3 --waitretry=3' - 'http::/usr/bin/wget -c -t 3 --waitretry=3' - 'https::/usr/bin/wget -c -t 3 --waitretry=3 --no-check-certificate' - 'rsync::/usr/bin/rsync -z' - 'scp::/usr/bin/scp -C') +DLAGENTS=('ftp::/usr/bin/wget -c --passive-ftp -t 3 --waitretry=3 -O %o %u' + 'http::/usr/bin/wget -c -t 3 --waitretry=3 -O %o %u' + 'https::/usr/bin/wget -c -t 3 --waitretry=3 --no-check-certificate -O %o %u' + 'rsync::/usr/bin/rsync -z %u %o' + 'scp::/usr/bin/scp -C %u %o')
Damn, I just wish we could leave what works alone, but that is too hard. :P
Is there anyway we can slightly rework the below so that if neither %o or %u are found in the DLAGENT, we basically do the former behavior? Not sure if this is completely feasible, but it would be nice to have the simple option still available (and especially if someone is using a download client that doesn't need all this complexity).
Here's the latest version with all bugs fixed and backwards compatibility introduced. ;-)
From 6fc40a691f6c2d2b11fd8c3f9fe0648aead34484 Mon Sep 17 00:00:00 2001
From: Roman Kyrylych <roman@archlinux.org> Date: Sun, 10 Feb 2008 18:56:47 +0200 Subject: [PATCH] makepkg: Support for resuming source downloads
Download to *.part and remove the suffix if successful, thus md5sums will be checked only for complete files, and next time makepkg will resume downloading of partial file
instead of complaining about invalid md5sums.
Old DLAGENTS format is still supported.
. . . Dan, Xavier, Nagy, did you try this? ;-) -- Roman Kyrylych (Роман Кирилич)