[pacman-dev] [PATCH] makepkg: remove .part file after a failed download

Henning Garus henning.garus at googlemail.com
Wed Oct 21 18:24:22 EDT 2009


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 at 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. 


More information about the pacman-dev mailing list