From 3e80462940a5cf3c140e7389b88816eb559a0b74 Mon Sep 17 00:00:00 2001 From: Philip Date: Fri, 1 Jun 2018 10:05:30 +0200 Subject: [PATCH] [mkchrootpkg] Upstream fixes - makepkg 5.1 implements error codes, and 14 means that installing the packages after they were built has failed. We don't care about this error and would like makechrootpkg to succeed regardless, e.g. for split packages that are mutually exclusive. - Do not assume the makechrootpkg user's groupname is the same as the username --- bin/mkchrootpkg.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/mkchrootpkg.in b/bin/mkchrootpkg.in index 08f6913..3efd0e4 100644 --- a/bin/mkchrootpkg.in +++ b/bin/mkchrootpkg.in @@ -242,6 +242,12 @@ _chrootbuild() { # cd /startdir # sudo -u builduser makepkg "$@" sudo -iu builduser bash -c 'cd /startdir; makepkg "$@"' -bash "$@" + + ret=$? + case $ret in + 0|14) return 0;; + *) return $ret;; + esac } _chrootnamcap() { @@ -254,7 +260,7 @@ _chrootnamcap() { download_sources() { local builddir="$(mktemp -d)" - chown $SUDO_USER:$SUDO_USER "$builddir" + chown $SUDO_USER: "$builddir" # Ensure sources are downloaded if [[ -n $SUDO_USER ]]; then