summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-03-10 12:01:21 +0000
committerZac Medico <zmedico@gentoo.org>2006-03-10 12:01:21 +0000
commitcd219536929f24fa576848b920bae7dd6d2e223e (patch)
tree730704a6e38315276adb8f9e5cfcfc8c749e06e7
parentc1c15c14c71fd6b88058625074cce6e934534a01 (diff)
downloadportage-cd219536929f24fa576848b920bae7dd6d2e223e.tar.gz
portage-cd219536929f24fa576848b920bae7dd6d2e223e.tar.bz2
portage-cd219536929f24fa576848b920bae7dd6d2e223e.zip
Fix dyn_clean in ebuild.sh so that it removes the builddir correctly (if it is empty). See bug #105706.
svn path=/main/trunk/; revision=2840
-rwxr-xr-xbin/ebuild.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 810aa1d89..c4bc9bff5 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -763,12 +763,14 @@ dyn_clean() {
find "${PORTAGE_BUILDDIR}" -type d ! -regex "^${WORKDIR}" | sort -r | tr "\n" "\0" | $XARGS -0 rmdir &>/dev/null
fi
- if [ -z "$(find "${PORTAGE_BUILDDIR}" -mindepth 1 -maxdepth 1)" ]; then
- rmdir "${PORTAGE_BUILDDIR}"
- fi
# do not bind this to doebuild defined DISTDIR; don't trust doebuild, and if mistakes are made it'll
# result in it wiping the users distfiles directory (bad).
rm -rf "${PORTAGE_BUILDDIR}/distdir"
+
+ if [ -z "$(find "${PORTAGE_BUILDDIR}" -mindepth 1 -maxdepth 1)" ]; then
+ rmdir "${PORTAGE_BUILDDIR}"
+ fi
+
true
}