[pacman-dev] [PATCH] makepkg: remove .part file after a failed download
Signed-off-by: Cedric Staniewski <cedric@gmx.ca> --- scripts/makepkg.sh.in | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 40367ae..f6b87c2 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -336,7 +336,12 @@ download_file() { dlcmd="$dlcmd \"$url\"" fi - eval $dlcmd || return $? + eval $dlcmd + local ret=$? + if [ $ret -gt 0 ]; then + rm -f -- "$dlfile" + return $ret + fi # rename the temporary download file to the final destination if [ "$dlfile" != "$file" ]; then -- 1.6.5.1
On Wed, Oct 21, 2009 at 7:13 PM, Cedric Staniewski <cedric@gmx.ca> wrote:
Signed-off-by: Cedric Staniewski <cedric@gmx.ca> --- scripts/makepkg.sh.in | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 40367ae..f6b87c2 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -336,7 +336,12 @@ download_file() { dlcmd="$dlcmd \"$url\"" fi
- eval $dlcmd || return $? + eval $dlcmd + local ret=$? + if [ $ret -gt 0 ]; then + rm -f -- "$dlfile" + return $ret + fi
# rename the temporary download file to the final destination if [ "$dlfile" != "$file" ]; then
The purpose of the .part file is to allow resume. So I don't think we want to remove it. What was your intention, why are .part files a problem ?
Xavier wrote:
On Wed, Oct 21, 2009 at 7:13 PM, Cedric Staniewski <cedric@gmx.ca> wrote:
Signed-off-by: Cedric Staniewski <cedric@gmx.ca> --- scripts/makepkg.sh.in | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 40367ae..f6b87c2 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -336,7 +336,12 @@ download_file() { dlcmd="$dlcmd \"$url\"" fi
- eval $dlcmd || return $? + eval $dlcmd + local ret=$? + if [ $ret -gt 0 ]; then + rm -f -- "$dlfile" + return $ret + fi
# rename the temporary download file to the final destination if [ "$dlfile" != "$file" ]; then
The purpose of the .part file is to allow resume. So I don't think we want to remove it. What was your intention, why are .part files a problem ?
Actually never thought about that since I did not experience a disrupted download so far. Therefore, the only .part files I saw were empty ones, because the source did not existed anymore or the url was just wrong. Attached a new patch which should only remove the empty .part files. Thanks for the pointer.
From c2a5b433f810995de5d7520287d5ea0c8209ecfa Mon Sep 17 00:00:00 2001 -- 8< -- From: Cedric Staniewski <cedric@gmx.ca> Date: Wed, 21 Oct 2009 19:13:36 +0200 Subject: [PATCH] makepkg: remove empty .part files after a failed download
Signed-off-by: Cedric Staniewski <cedric@gmx.ca> --- scripts/makepkg.sh.in | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 40367ae..3f1a054 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -336,7 +336,12 @@ download_file() { dlcmd="$dlcmd \"$url\"" fi - eval $dlcmd || return $? + eval $dlcmd + local ret=$? + if [ $ret -gt 0 ]; then + [ ! -s "$dlfile" ] && rm -f -- "$dlfile" + return $ret + fi # rename the temporary download file to the final destination if [ "$dlfile" != "$file" ]; then -- 1.6.5.1
On Wed, Oct 21, 2009 at 7:38 PM, Cedric Staniewski <cedric@gmx.ca> wrote:
Actually never thought about that since I did not experience a disrupted download so far. Therefore, the only .part files I saw were empty ones, because the source did not existed anymore or the url was just wrong.
Attached a new patch which should only remove the empty .part files. Thanks for the pointer.
I am far from being a hardcore makepkg user, but I still find it strange that I never saw this happening. I would expect the download program to not create empty .part files when the source is wrong. Did you change the dlagent somehow ? Did you try to run the download programs directly, without using makepkg ? Though I have to admit I did not check this behavior yet, I will check later today.
Xavier wrote:
On Wed, Oct 21, 2009 at 7:38 PM, Cedric Staniewski <cedric@gmx.ca> wrote:
Actually never thought about that since I did not experience a disrupted download so far. Therefore, the only .part files I saw were empty ones, because the source did not existed anymore or the url was just wrong.
Attached a new patch which should only remove the empty .part files. Thanks for the pointer.
I am far from being a hardcore makepkg user, but I still find it strange that I never saw this happening. I would expect the download program to not create empty .part files when the source is wrong. Did you change the dlagent somehow ?
I don't think so.
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')
Did you try to run the download programs directly, without using makepkg ?
Just did that: $ ls -s total 0 $ /usr/bin/wget -c -t 3 --waitretry=3 -O "Baralga-Portable-1.4.4-SNAPSHOT.zip.part" "http://download.origo.ethz.ch/baralga/147/Baralga-Portable-1.4.4-SNAPSHOT.zi..." --2009-10-21 19:51:31-- http://download.origo.ethz.ch/baralga/147/Baralga-Portable-1.4.4-SNAPSHOT.zi... Resolving download.origo.ethz.ch... 129.132.103.135, 2001:620:8:1000::15 Connecting to download.origo.ethz.ch|129.132.103.135|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2009-10-21 19:51:31 ERROR 404: Not Found. $ ls -s total 0 0 Baralga-Portable-1.4.4-SNAPSHOT.zip.part
Though I have to admit I did not check this behavior yet, I will check later today.
On Wed, Oct 21, 2009 at 7:38 PM, Cedric Staniewski <cedric@gmx.ca> wrote:
- eval $dlcmd || return $? + eval $dlcmd + local ret=$? + if [ $ret -gt 0 ]; then + [ ! -s "$dlfile" ] && rm -f -- "$dlfile" + return $ret + fi
I don't understand, I cannot get it to work. It looks like when "eval $dlcmd" fails, nothing else is run in that function. I added a echo statement, but I still only see that message at the end : ==> ERROR: An unknown error has occurred. Exiting...
2009/10/22 Xavier <shiningxc@gmail.com>
On Wed, Oct 21, 2009 at 7:38 PM, Cedric Staniewski <cedric@gmx.ca> wrote:
- eval $dlcmd || return $? + eval $dlcmd + local ret=$? + if [ $ret -gt 0 ]; then + [ ! -s "$dlfile" ] && rm -f -- "$dlfile" + return $ret + fi
I don't understand, I cannot get it to work. It looks like when "eval $dlcmd" fails, nothing else is run in that function.
I added a echo statement, but I still only see that message at the end : ==> ERROR: An unknown error has occurred. Exiting...
looks like there is no return to handle (fail but no reason given), so makepkg traps that.
Ray Rashif wrote:
2009/10/22 Xavier <shiningxc@gmail.com>
On Wed, Oct 21, 2009 at 7:38 PM, Cedric Staniewski <cedric@gmx.ca> wrote:
- eval $dlcmd || return $? + eval $dlcmd + local ret=$? + if [ $ret -gt 0 ]; then + [ ! -s "$dlfile" ] && rm -f -- "$dlfile" + return $ret + fi
I don't understand, I cannot get it to work. It looks like when "eval $dlcmd" fails, nothing else is run in that function.
I added a echo statement, but I still only see that message at the end : ==> ERROR: An unknown error has occurred. Exiting...
looks like there is no return to handle (fail but no reason given), so makepkg traps that.
That's odd. I patched makepkg from pacman 3.3.2 to test the patch, so I did not notice this. But this bug (or is it intended?) already exists in master. You can remove the "|| return $?" part from the eval line, add echos and it fails just before the second echo. - eval $dlcmd || return $? + echo asdf + eval $dlcmd + echo dfgh $ sh makepkg -g ==> Retrieving Sources... -> Found baralga in build dir -> Downloading Baralga-Portable-1.4.4-SNAPSHOT.zip... asdf --2009-10-21 21:59:51-- http://download.origo.ethz.ch/baralga/147/Baralga-Portable-1.4.4-SNAPSHOT.zi... Resolving download.origo.ethz.ch... 129.132.103.135, 2001:620:8:1000::15 Connecting to download.origo.ethz.ch|129.132.103.135|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2009-10-21 21:59:51 ERROR 404: Not Found. ==> ERROR: An unknown error has occurred. Exiting...
On Wed, Oct 21, 2009 at 10:01 PM, Cedric Staniewski <cedric@gmx.ca> wrote:
Ray Rashif wrote:
2009/10/22 Xavier <shiningxc@gmail.com>
On Wed, Oct 21, 2009 at 7:38 PM, Cedric Staniewski <cedric@gmx.ca> wrote:
- eval $dlcmd || return $? + eval $dlcmd + local ret=$? + if [ $ret -gt 0 ]; then + [ ! -s "$dlfile" ] && rm -f -- "$dlfile" + return $ret + fi
I don't understand, I cannot get it to work. It looks like when "eval $dlcmd" fails, nothing else is run in that function.
I added a echo statement, but I still only see that message at the end : ==> ERROR: An unknown error has occurred. Exiting...
looks like there is no return to handle (fail but no reason given), so makepkg traps that.
That's odd. I patched makepkg from pacman 3.3.2 to test the patch, so I did not notice this. But this bug (or is it intended?) already exists in master. You can remove the "|| return $?" part from the eval line, add echos and it fails just before the second echo.
The issue reminded me of the following patch : http://projects.archlinux.org/?p=pacman.git;a=commitdiff;h=545eac145d77c6671... But it seems errexit is only enabled for build and package functions, so this should not affect sources download.
Xavier wrote:
On Wed, Oct 21, 2009 at 10:01 PM, Cedric Staniewski <cedric@gmx.ca> wrote:
Ray Rashif wrote:
2009/10/22 Xavier <shiningxc@gmail.com>
On Wed, Oct 21, 2009 at 7:38 PM, Cedric Staniewski <cedric@gmx.ca> wrote:
- eval $dlcmd || return $? + eval $dlcmd + local ret=$? + if [ $ret -gt 0 ]; then + [ ! -s "$dlfile" ] && rm -f -- "$dlfile" + return $ret + fi
I don't understand, I cannot get it to work. It looks like when "eval $dlcmd" fails, nothing else is run in that function.
I added a echo statement, but I still only see that message at the end : ==> ERROR: An unknown error has occurred. Exiting...
looks like there is no return to handle (fail but no reason given), so makepkg traps that. That's odd. I patched makepkg from pacman 3.3.2 to test the patch, so I did not notice this. But this bug (or is it intended?) already exists in master. You can remove the "|| return $?" part from the eval line, add echos and it fails just before the second echo.
The issue reminded me of the following patch : http://projects.archlinux.org/?p=pacman.git;a=commitdiff;h=545eac145d77c6671...
But it seems errexit is only enabled for build and package functions, so this should not affect sources download.
Already found the responsible change. It's 'set -E' from the patch you mentioned. There are three possible solutions I see: - remove set -E - add some code to dlcmd to handle the error code in the subshell - try to get rid of eval so that the code is not executed in a subshell anymore
Cedric Staniewski wrote:
Xavier wrote:
On Wed, Oct 21, 2009 at 10:01 PM, Cedric Staniewski <cedric@gmx.ca> wrote:
Ray Rashif wrote:
2009/10/22 Xavier <shiningxc@gmail.com>
On Wed, Oct 21, 2009 at 7:38 PM, Cedric Staniewski <cedric@gmx.ca> wrote:
- eval $dlcmd || return $? + eval $dlcmd + local ret=$? + if [ $ret -gt 0 ]; then + [ ! -s "$dlfile" ] && rm -f -- "$dlfile" + return $ret + fi
I don't understand, I cannot get it to work. It looks like when "eval $dlcmd" fails, nothing else is run in that function.
I added a echo statement, but I still only see that message at the end : ==> ERROR: An unknown error has occurred. Exiting...
looks like there is no return to handle (fail but no reason given), so makepkg traps that. That's odd. I patched makepkg from pacman 3.3.2 to test the patch, so I did not notice this. But this bug (or is it intended?) already exists in master. You can remove the "|| return $?" part from the eval line, add echos and it fails just before the second echo.
The issue reminded me of the following patch : http://projects.archlinux.org/?p=pacman.git;a=commitdiff;h=545eac145d77c6671...
But it seems errexit is only enabled for build and package functions, so this should not affect sources download.
Already found the responsible change. It's 'set -E' from the patch you mentioned.
There are three possible solutions I see: - remove set -E - add some code to dlcmd to handle the error code in the subshell - try to get rid of eval so that the code is not executed in a subshell anymore
eval is needed, so I added some code to dlcmd. This patch finally works, even with latest git. ;) Thanks Xavier and Ray; I should really take a look in the Makefiles to find a way to only "build" makepkg.
From e809e3182f94fd4144cdb816d0af90587bf04ea2 Mon Sep 17 00:00:00 2001 From: Cedric Staniewski <cedric@gmx.ca> Date: Wed, 21 Oct 2009 19:13:36 +0200 -- 8< -- Subject: [PATCH] makepkg: remove empty .part files after a failed download
Signed-off-by: Cedric Staniewski <cedric@gmx.ca> --- scripts/makepkg.sh.in | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 40367ae..78b6904 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -336,7 +336,12 @@ download_file() { dlcmd="$dlcmd \"$url\"" fi - eval $dlcmd || return $? + local ret=0 + eval "$dlcmd || ret=\$?" + if [ $ret -gt 0 ]; then + [ ! -s "$dlfile" ] && rm -f -- "$dlfile" + return $ret + fi # rename the temporary download file to the final destination if [ "$dlfile" != "$file" ]; then -- 1.6.5.1
On Wed, Oct 21, 2009 at 3:40 PM, Cedric Staniewski <cedric@gmx.ca> wrote:
eval is needed, so I added some code to dlcmd. This patch finally works, even with latest git. ;) Thanks Xavier and Ray; I should really take a look in the Makefiles to find a way to only "build" makepkg.
cd scripts/ make
Dan McGee wrote:
On Wed, Oct 21, 2009 at 3:40 PM, Cedric Staniewski <cedric@gmx.ca> wrote:
eval is needed, so I added some code to dlcmd. This patch finally works, even with latest git. ;) Thanks Xavier and Ray; I should really take a look in the Makefiles to find a way to only "build" makepkg.
cd scripts/ make
... Thanks. :D
On Wed, Oct 21, 2009 at 10:40:25PM +0200, Cedric Staniewski wrote:
Cedric Staniewski wrote:
Xavier wrote:
The issue reminded me of the following patch : http://projects.archlinux.org/?p=pacman.git;a=commitdiff;h=545eac145d77c6671...
But it seems errexit is only enabled for build and package functions, so this should not affect sources download.
Already found the responsible change. It's 'set -E' from the patch you mentioned.
There are three possible solutions I see: - remove set -E - add some code to dlcmd to handle the error code in the subshell - try to get rid of eval so that the code is not executed in a subshell anymore
I added set -E in that patch globally because there already was an error trap lying around accumulating dust. Maybe the fact that there is always an error trap active should be documented somewhere. I am not sure where, maybe at the top of makepkg?
eval is needed, so I added some code to dlcmd. This patch finally works, even with latest git. ;) Thanks Xavier and Ray; I should really take a look in the Makefiles to find a way to only "build" makepkg.
From e809e3182f94fd4144cdb816d0af90587bf04ea2 Mon Sep 17 00:00:00 2001 From: Cedric Staniewski <cedric@gmx.ca> Date: Wed, 21 Oct 2009 19:13:36 +0200 -- 8< -- Subject: [PATCH] makepkg: remove empty .part files after a failed download
Signed-off-by: Cedric Staniewski <cedric@gmx.ca> --- scripts/makepkg.sh.in | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 40367ae..78b6904 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -336,7 +336,12 @@ download_file() { dlcmd="$dlcmd \"$url\"" fi
- eval $dlcmd || return $? + local ret=0 + eval "$dlcmd || ret=\$?"
eval $dlcmd || ret=$? seems to work as well.
+ if [ $ret -gt 0 ]; then + [ ! -s "$dlfile" ] && rm -f -- "$dlfile" + return $ret + fi
# rename the temporary download file to the final destination if [ "$dlfile" != "$file" ]; then -- 1.6.5.1
On Wed, Oct 21, 2009 at 11:41 PM, Henning Garus <henning.garus@googlemail.com> wrote:
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 40367ae..78b6904 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -336,7 +336,12 @@ download_file() { dlcmd="$dlcmd \"$url\"" fi
- eval $dlcmd || return $? + local ret=0 + eval "$dlcmd || ret=\$?"
eval $dlcmd || ret=$? seems to work as well.
Hmm, I am pretty sure I tried that and it did not work either.
On Wed, Oct 21, 2009 at 11:41:18PM +0200, Xavier wrote:
On Wed, Oct 21, 2009 at 11:41 PM, Henning Garus <henning.garus@googlemail.com> wrote:
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 40367ae..78b6904 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -336,7 +336,12 @@ download_file() { dlcmd="$dlcmd \"$url\"" fi
- eval $dlcmd || return $? + local ret=0 + eval "$dlcmd || ret=\$?"
eval $dlcmd || ret=$? seems to work as well.
Hmm, I am pretty sure I tried that and it did not work either.
I am sorry, you are right. A little offtopic: Why does cmd="false" eval $cmd || ret=$? echo "ret=$ret" behave differently for set -e and trap "somecommand" ERR ? I'll look into that tomorrow.
On Wed, Oct 21, 2009 at 10:40 PM, Cedric Staniewski <cedric@gmx.ca> wrote:
From e809e3182f94fd4144cdb816d0af90587bf04ea2 Mon Sep 17 00:00:00 2001 From: Cedric Staniewski <cedric@gmx.ca> Date: Wed, 21 Oct 2009 19:13:36 +0200 -- 8< -- Subject: [PATCH] makepkg: remove empty .part files after a failed download
Signed-off-by: Cedric Staniewski <cedric@gmx.ca> --- scripts/makepkg.sh.in | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 40367ae..78b6904 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -336,7 +336,12 @@ download_file() { dlcmd="$dlcmd \"$url\"" fi
- eval $dlcmd || return $? + local ret=0 + eval "$dlcmd || ret=\$?" + if [ $ret -gt 0 ]; then + [ ! -s "$dlfile" ] && rm -f -- "$dlfile" + return $ret + fi
# rename the temporary download file to the final destination if [ "$dlfile" != "$file" ]; then -- 1.6.5.1
This one works for me now, applied to my working branch.
Xavier wrote:
On Wed, Oct 21, 2009 at 10:40 PM, Cedric Staniewski <cedric@gmx.ca> wrote:
From e809e3182f94fd4144cdb816d0af90587bf04ea2 Mon Sep 17 00:00:00 2001 From: Cedric Staniewski <cedric@gmx.ca> Date: Wed, 21 Oct 2009 19:13:36 +0200 -- 8< -- Subject: [PATCH] makepkg: remove empty .part files after a failed download
Signed-off-by: Cedric Staniewski <cedric@gmx.ca> --- scripts/makepkg.sh.in | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 40367ae..78b6904 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -336,7 +336,12 @@ download_file() { dlcmd="$dlcmd \"$url\"" fi
- eval $dlcmd || return $? + local ret=0 + eval "$dlcmd || ret=\$?" + if [ $ret -gt 0 ]; then + [ ! -s "$dlfile" ] && rm -f -- "$dlfile" + return $ret + fi
# rename the temporary download file to the final destination if [ "$dlfile" != "$file" ]; then -- 1.6.5.1
This one works for me now, applied to my working branch.
This looks a really nice feature. I end up having a lot of empty .part files in my build tree. Allan
On Wed, Oct 21, 2009 at 6:59 PM, Allan McRae <allan@archlinux.org> wrote:
Xavier wrote:
On Wed, Oct 21, 2009 at 10:40 PM, Cedric Staniewski <cedric@gmx.ca> wrote:
From e809e3182f94fd4144cdb816d0af90587bf04ea2 Mon Sep 17 00:00:00 2001 From: Cedric Staniewski <cedric@gmx.ca> Date: Wed, 21 Oct 2009 19:13:36 +0200 -- 8< -- Subject: [PATCH] makepkg: remove empty .part files after a failed download
Signed-off-by: Cedric Staniewski <cedric@gmx.ca> --- scripts/makepkg.sh.in | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 40367ae..78b6904 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -336,7 +336,12 @@ download_file() { dlcmd="$dlcmd \"$url\"" fi
- eval $dlcmd || return $? + local ret=0 + eval "$dlcmd || ret=\$?" + if [ $ret -gt 0 ]; then + [ ! -s "$dlfile" ] && rm -f -- "$dlfile" + return $ret + fi
# rename the temporary download file to the final destination if [ "$dlfile" != "$file" ]; then -- 1.6.5.1
This one works for me now, applied to my working branch.
This looks a really nice feature. I end up having a lot of empty .part files in my build tree.
I had no idea this was happening, so thanks for finding it: $ ll /home/makepkg/sources/*.part -rw-r--r-- 1 dmcgee wheel 0 2009-08-17 19:18 /home/makepkg/sources/libfetch-2.24.tar.gz.part -rw-r--r-- 1 dmcgee wheel 0 2009-04-12 21:05 /home/makepkg/sources/libstdc++-man-20080118.tar.bz2.part -rw-r--r-- 1 dmcgee wheel 0 2009-09-22 21:49 /home/makepkg/sources/pacman-3.3.1.tar.gz.part -rw-r--r-- 1 dmcgee wheel 0 2009-10-07 18:46 /home/makepkg/sources/pacman-3.3.2.tar.gz.part -rw-r--r-- 1 dmcgee wheel 1.8M 2009-01-29 23:21 /home/makepkg/sources/vpnclient-linux-x86_64-4.8.01.0640-k9.tar.gz.part -rw-r--r-- 1 dmcgee wheel 0 2009-08-16 16:27 /home/makepkg/sources/wine-1.1.27-1-i686.pkg.tar.gz.part
2009/10/22 Cedric Staniewski <cedric@gmx.ca>
Signed-off-by: Cedric Staniewski <cedric@gmx.ca> --- scripts/makepkg.sh.in | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 40367ae..f6b87c2 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -336,7 +336,12 @@ download_file() { dlcmd="$dlcmd \"$url\"" fi
- eval $dlcmd || return $? + eval $dlcmd + local ret=$? + if [ $ret -gt 0 ]; then + rm -f -- "$dlfile" + return $ret + fi
# rename the temporary download file to the final destination if [ "$dlfile" != "$file" ]; then -- 1.6.5.1
Let me just enquire on this, what is "failed" here? Because I would like to resume my retrieval :) Thanks beforehand.
participants (6)
-
Allan McRae
-
Cedric Staniewski
-
Dan McGee
-
Henning Garus
-
Ray Rashif
-
Xavier