summaryrefslogtreecommitdiff
path: root/makechrootpkg.in
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2019-08-08 19:58:23 -0400
committerLevente Polyak <anthraxx@archlinux.org>2019-08-09 19:41:54 +0200
commitbe44b9cde15f3228839253c0c0d7d56c124c4e26 (patch)
tree53ee82436167a5da8268cfdd2e850543c63b0379 /makechrootpkg.in
parent7b0a11677a7c5a3a9490a1d7f30f590265db7689 (diff)
downloaddevtools32-be44b9cde15f3228839253c0c0d7d56c124c4e26.tar.xz
makechrootpkg: with -n, check if the package failed to install
We previously whitelisted this return code because split packages can frequently conflict each other, so makepkg -i is *expected* to fail in such a case. However, there is no good reason to let this succeed if the pkgbase only builds one pkgname -- that will always be a severe issue. Add a check for how many split Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
Diffstat (limited to 'makechrootpkg.in')
-rw-r--r--makechrootpkg.in9
1 files changed, 8 insertions, 1 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in
index 2407115..ce47b93 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -232,8 +232,15 @@ _chrootbuild() {
sudo --preserve-env=SOURCE_DATE_EPOCH -iu builduser bash -c 'cd /startdir; makepkg "$@"' -bash "$@"
ret=$?
case $ret in
- 0|14)
+ 0)
return 0;;
+ 14)
+ # whitelist "The package failed to install." but only if there are multiple split packages
+ # in which case they might be conflicting
+ local pkgfiles=(/pkgdest/*.pkg.tar.xz)
+ (( ${#pkgfiles[@]} > 1))
+ return $?;;
+
*)
return $ret;;
esac