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

Ray Rashif schivmeister at gmail.com
Wed Oct 21 13:20:01 EDT 2009


2009/10/22 Cedric Staniewski <cedric at gmx.ca>

> Signed-off-by: Cedric Staniewski <cedric at 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.


More information about the pacman-dev mailing list