summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-04-24 11:07:05 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-04-24 11:07:05 -0400
commit5862f234db5cb5237430453539ab0120286df838 (patch)
treeae15d8394f46d27a68e799279a35d5a9d9339f23
parentaf743e1cbad18a1a7a6a6cdc0feef3b80e13db03 (diff)
parent0dc2550af36fa0b14dae7317e63707408021d1f9 (diff)
downloaddevtools-5862f234db5cb5237430453539ab0120286df838.tar.xz
Merge commit '0dc255' into complete
Conflicts: makechrootpkg.in
-rw-r--r--makechrootpkg.in11
1 files changed, 4 insertions, 7 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in
index 63ea388..39d57e9 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -22,6 +22,7 @@ run_namcap=false
chrootdir=
passeddir=
declare -a install_pkgs
+declare -i ret=0
default_copy=$USER
[[ -n $SUDO_USER ]] && default_copy=$SUDO_USER
@@ -144,7 +145,6 @@ if [[ ! -d $copydir ]] || $clean_first; then
fi
if [[ -n "${install_pkgs[*]}" ]]; then
- declare -i ret=0
for install_pkg in "${install_pkgs[@]}"; do
pkgname="${install_pkg##*/}"
cp "$install_pkg" "$copydir/$pkgname"
@@ -261,9 +261,7 @@ cat >"$copydir/chrootbuild" <<EOF
export HOME=/build
cd /build
-sudo -u nobody ${MAKEPKG:-makepkg} $makepkg_args || touch BUILD_FAILED
-
-[[ -f BUILD_FAILED ]] && exit 1
+sudo -u nobody makepkg $makepkg_args || exit 1
if $run_namcap; then
pacman -S --needed --noconfirm namcap
@@ -297,7 +295,7 @@ if mkarchroot -r "/chrootbuild" "$copydir"; then
done
else
# Just in case. We returned 1, make sure we fail
- touch "$copydir/build/BUILD_FAILED"
+ ret=1
fi
for f in "$copydir"/srcdest/*; do
@@ -305,7 +303,6 @@ for f in "$copydir"/srcdest/*; do
mv "$f" "$SRCDEST"
done
-if [[ -e $copydir/build/BUILD_FAILED ]]; then
- rm "$copydir/build/BUILD_FAILED"
+if (( ret != 0 )); then
die "Build failed, check $copydir/build"
fi