From be44b9cde15f3228839253c0c0d7d56c124c4e26 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Thu, 8 Aug 2019 19:58:23 -0400 Subject: 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 --- makechrootpkg.in | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3-70-g09d2