From: Zac Medico Date: Tue, 28 Feb 2006 00:24:26 +0000 (-0000) Subject: Add a sanity check in dyn_clean() to make sure that PORTAGE_BUILDDIR is not zero... X-Git-Tag: v2.1_pre6~45 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=79d7a6bd32a8734727437bfed97bb94e29c8dd7d;p=portage.git 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 --- 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}"