From 37bb1d33a78130743bda3e4a0bdde3768e2b6062 Mon Sep 17 00:00:00 2001
From: Pierre Schmitz <pierre@archlinux.de>
Date: Wed, 3 Oct 2012 12:32:03 +0200
Subject: [PATCH] archbuild: abort if update or creation of the chroot fails

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

diff --git a/archbuild.in b/archbuild.in
index c39760e..00234f3 100644
--- a/archbuild.in
+++ b/archbuild.in
@@ -61,13 +61,13 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then
 		-C "@pkgdatadir@/pacman-${repo}.conf" \
 		-M "@pkgdatadir@/makepkg-${arch}.conf" \
 		"${chroots}/${repo}-${arch}/root" \
-		"${base_packages[@]}"
+		"${base_packages[@]}" || abort
 else
 	setarch ${arch} mkarchroot \
 		-u \
 		-C "@pkgdatadir@/pacman-${repo}.conf" \
 		-M "@pkgdatadir@/makepkg-${arch}.conf" \
-		"${chroots}/${repo}-${arch}/root"
+		"${chroots}/${repo}-${arch}/root" || abort
 fi
 
 msg "Building in chroot for [${repo}] (${arch})..."
-- 
GitLab