[arch-projects] [devtools][PATCH] archbuild: exec makechrootpkg to preserve exit value

Dave Reisner d at falconindy.com
Sun Dec 4 12:09:16 EST 2011


This fixes a compound command such as the one below from continuing even
if the first fails.

  extra-x86_64-build && extra-i686-build

The problem is that 'cleanup 0' is triggered in archbuild even after an
unsucessful call to makechrootpkg. Since both archbuild and
makechrootpkg share the exact same cleanup function (from lib/common),
we simply force the shell to exit with the true return value by exec'ing
the call to makechrootpkg.

Signed-off-by: Dave Reisner <dreisner at archlinux.org>
---
v2 of the earlier patch.

 archbuild.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/archbuild.in b/archbuild.in
index 502654c..4e16d1f 100644
--- a/archbuild.in
+++ b/archbuild.in
@@ -83,4 +83,4 @@ else
 fi
 
 msg "Building in chroot for [${repo}] (${arch})..."
-setarch "${arch}" makechrootpkg -c -n -r "${chroots}/${repo}-${arch}"
+exec setarch "${arch}" makechrootpkg -c -n -r "${chroots}/${repo}-${arch}"
-- 
1.7.8



More information about the arch-projects mailing list