[pacman-dev] [PATCH] Return 17 if a package/group has been built.

Dave Reisner d at falconindy.com
Fri May 22 12:09:46 UTC 2015


On May 22, 2015 8:07 AM, "fbt" <fbt at fleshless.org> wrote:
>
> A specific exit code to distinguish failed builds and refusal to build
> because the package/group has already been built.
> Useful in autobuild scripts.

Why 17? Where's the documentation? What about other error-exit conditions?

> Signed-off-by: Jack L. Frost <fbt at fleshless.org>
> ---
>  scripts/makepkg.sh.in | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index c74e84a..72cf714 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -1613,7 +1613,7 @@ check_build_status() {
>                                 exit 0
>                         else
>                                 error "$(gettext "A package has already
been built. (use %s to overwrite)")" "-f"
> -                               exit 1
> +                               exit 17
>                         fi
>                 fi
>         else
> @@ -1636,12 +1636,12 @@ check_build_status() {
>                                         exit 0
>                                 else
>                                         error "$(gettext "The package
group has already been built. (use %s to overwrite)")" "-f"
> -                                       exit 1
> +                                       exit 17
>                                 fi
>                         fi
>                         if (( somepkgbuilt && ! PKGVERFUNC )); then
>                                 error "$(gettext "Part of the package
group has already been built. (use %s to overwrite)")" "-f"
> -                               exit 1
> +                               exit 17
>                         fi
>                 fi
>                 unset allpkgbuilt somepkgbuilt
> --
> 2.4.1


More information about the pacman-dev mailing list