summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-02-28 00:24:26 +0000
committerZac Medico <zmedico@gentoo.org>2006-02-28 00:24:26 +0000
commit79d7a6bd32a8734727437bfed97bb94e29c8dd7d (patch)
treef715dcd6cf2e67dfaed1f09df4c0935008f1484b
parentd0805ce7e684c0cfc0fcbfaba76f1448e542ffa6 (diff)
downloadportage-79d7a6bd32a8734727437bfed97bb94e29c8dd7d.tar.gz
portage-79d7a6bd32a8734727437bfed97bb94e29c8dd7d.tar.bz2
portage-79d7a6bd32a8734727437bfed97bb94e29c8dd7d.zip
Add a sanity check in dyn_clean() to make sure that PORTAGE_BUILDDIR is not zero length for bug #124203.
svn path=/main/trunk/; revision=2800
-rwxr-xr-xbin/ebuild.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 7701af1b3..764a59b9a 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -727,6 +727,11 @@ dyn_unpack() {
}
dyn_clean() {
+ if [ -z "${PORTAGE_BUILDDIR}" ]; then
+ echo "Aborting clean phase because PORTAGE_BUILDDIR is unset!"
+ return 1
+ fi
+
if [ "$USERLAND" == "BSD" ] && type -p chflags &>/dev/null; then
chflags -R noschg,nouchg,nosappnd,nouappnd,nosunlnk,nouunlnk \
"${PORTAGE_BUILDDIR}"