From 17ecb862f2ce366ee9e3ab7c3cdfc03f93b17dd9 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Mon, 21 Apr 2008 22:56:58 -0500 Subject: 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 --- makechrootpkg | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'makechrootpkg') diff --git a/makechrootpkg b/makechrootpkg index 89ef5ba..3050528 100755 --- a/makechrootpkg +++ b/makechrootpkg @@ -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: -- cgit v1.2.3-24-g4f1b