makechrootpkg: Always attempt to move pkg/src

Sometimes makepkg fails, but a package is built - for
instance, when makepkg cannot remove deps. In this case we
will attempt to move the pkg/src files regardless.

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
This commit is contained in:
Aaron Griffin 2008-04-21 22:56:58 -05:00
parent 6805bc54f4
commit 17ecb862f2
1 changed files with 13 additions and 12 deletions

View File

@ -193,22 +193,23 @@ chmod +x "$uniondir/chrootbuild"
mkarchroot -r "/chrootbuild" "$uniondir"
source ${WORKDIR}/PKGBUILD
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
if [ -e ${chrootdir}/rw/build/BUILD_FAILED ]; then
echo "Build failed, check \$CHROOT_DIR/rw/build"
rm ${chrootdir}/rw/build/BUILD_FAILED
exit 1
else
source ${WORKDIR}/PKGBUILD
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
rm -rf ${chrootdir}/rw/build/*
echo "Build complete"
fi
fi
# vim:ft=sh:ts=4:sw=4:et: