Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2009-02-25 10:11:39 -0800
committerAaron Griffin <aaronmgriffin@gmail.com>2009-02-25 10:11:39 -0800
commit97f7e2f2c304fe581f3a95ff1289c5cdc27b7229 (patch)
treeedf60bd47f15e77377781d6c3732815f14ef4a3c
parentf6f7a52f4bb845ca1a9682411ce770ca5d4aed86 (diff)
Check mkarchroot's return code
We weren't doing this before, and after build steps were being run even if the build failed or if the user cancelled the build Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
-rwxr-xr-xmakechrootpkg39
1 files changed, 21 insertions, 18 deletions
diff --git a/makechrootpkg b/makechrootpkg
index 35ca076..209f571 100755
--- a/makechrootpkg
+++ b/makechrootpkg
@@ -218,25 +218,28 @@ EOF
) > "$uniondir/chrootbuild"
chmod +x "$uniondir/chrootbuild"
-mkarchroot -r "/chrootbuild" "$uniondir"
-
-source ${WORKDIR}/PKGBUILD
-
-if [ -n "$add_to_db" ]; then
- [ -d "${chrootdir}/union/repo" ] || mkdir -p "${chrootdir}/union/repo"
- pushd "${chrootdir}/union/repo" >/dev/null
- cp ${chrootdir}/union/pkgdest/${pkgname}-${pkgver}-${pkgrel}-*.pkg.tar.gz .
- repo-add repo.db.tar.gz *.pkg.tar.gz
- popd >/dev/null
-fi
+if mkarchroot -r "/chrootbuild" "$uniondir"; then
+ source ${WORKDIR}/PKGBUILD
+
+ if [ -n "$add_to_db" ]; then
+ [ -d "${chrootdir}/union/repo" ] || mkdir -p "${chrootdir}/union/repo"
+ pushd "${chrootdir}/union/repo" >/dev/null
+ cp ${chrootdir}/union/pkgdest/${pkgname}-${pkgver}-${pkgrel}-*.pkg.tar.gz .
+ repo-add repo.db.tar.gz *.pkg.tar.gz
+ popd >/dev/null
+ fi
-if [ -z "$(mount | grep ${chrootdir}/union/pkgdest)" ]; then
- echo "Moving completed package file to ${WORKDIR}"
- mv ${chrootdir}/union/pkgdest/${pkgname}-${pkgver}-${pkgrel}-*.pkg.tar.gz ${WORKDIR}
-fi
-if [ -z "$(mount | grep ${chrootdir}/union/srcdest)" ]; then
- echo "Moving downloaded source files to ${WORKDIR}"
- mv ${chrootdir}/union/srcdest/* ${WORKDIR}
+ if [ -z "$(mount | grep ${chrootdir}/union/pkgdest)" ]; then
+ echo "Moving completed package file to ${WORKDIR}"
+ mv ${chrootdir}/union/pkgdest/${pkgname}-${pkgver}-${pkgrel}-*.pkg.tar.gz ${WORKDIR}
+ fi
+ if [ -z "$(mount | grep ${chrootdir}/union/srcdest)" ]; then
+ echo "Moving downloaded source files to ${WORKDIR}"
+ mv ${chrootdir}/union/srcdest/* ${WORKDIR}
+ fi
+else
+ #just in case. We returned 1, make sure we fail
+ touch ${chrootdir}/rw/build/BUILD_FAILED
fi
if [ -e ${chrootdir}/rw/build/BUILD_FAILED ]; then