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>
This commit is contained in:
parent
f6f7a52f4b
commit
97f7e2f2c3
|
@ -218,25 +218,28 @@ EOF
|
||||||
) > "$uniondir/chrootbuild"
|
) > "$uniondir/chrootbuild"
|
||||||
chmod +x "$uniondir/chrootbuild"
|
chmod +x "$uniondir/chrootbuild"
|
||||||
|
|
||||||
mkarchroot -r "/chrootbuild" "$uniondir"
|
if mkarchroot -r "/chrootbuild" "$uniondir"; then
|
||||||
|
source ${WORKDIR}/PKGBUILD
|
||||||
|
|
||||||
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 [ -n "$add_to_db" ]; then
|
if [ -z "$(mount | grep ${chrootdir}/union/pkgdest)" ]; then
|
||||||
[ -d "${chrootdir}/union/repo" ] || mkdir -p "${chrootdir}/union/repo"
|
echo "Moving completed package file to ${WORKDIR}"
|
||||||
pushd "${chrootdir}/union/repo" >/dev/null
|
mv ${chrootdir}/union/pkgdest/${pkgname}-${pkgver}-${pkgrel}-*.pkg.tar.gz ${WORKDIR}
|
||||||
cp ${chrootdir}/union/pkgdest/${pkgname}-${pkgver}-${pkgrel}-*.pkg.tar.gz .
|
fi
|
||||||
repo-add repo.db.tar.gz *.pkg.tar.gz
|
if [ -z "$(mount | grep ${chrootdir}/union/srcdest)" ]; then
|
||||||
popd >/dev/null
|
echo "Moving downloaded source files to ${WORKDIR}"
|
||||||
fi
|
mv ${chrootdir}/union/srcdest/* ${WORKDIR}
|
||||||
|
fi
|
||||||
if [ -z "$(mount | grep ${chrootdir}/union/pkgdest)" ]; then
|
else
|
||||||
echo "Moving completed package file to ${WORKDIR}"
|
#just in case. We returned 1, make sure we fail
|
||||||
mv ${chrootdir}/union/pkgdest/${pkgname}-${pkgver}-${pkgrel}-*.pkg.tar.gz ${WORKDIR}
|
touch ${chrootdir}/rw/build/BUILD_FAILED
|
||||||
fi
|
|
||||||
if [ -z "$(mount | grep ${chrootdir}/union/srcdest)" ]; then
|
|
||||||
echo "Moving downloaded source files to ${WORKDIR}"
|
|
||||||
mv ${chrootdir}/union/srcdest/* ${WORKDIR}
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e ${chrootdir}/rw/build/BUILD_FAILED ]; then
|
if [ -e ${chrootdir}/rw/build/BUILD_FAILED ]; then
|
||||||
|
|
Loading…
Reference in New Issue