From: Fabian Groffen <grobian@gentoo.org>
Date: Sun, 29 May 2011 09:00:46 +0000 (+0200)
Subject: prepall: don't operate on ${ED} when it doesn't exist
X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=58beaa6ce65c84bff14a02566e52493d8d4cfec1;p=portage.git

prepall: don't operate on ${ED} when it doesn't exist

prepall* funcs operate exclusively on ${ED}, which needs not to exist
when nothing is installed, such as e.g. with virtuals.  Refraining from
operating when ${ED} does not exist avoids error messages from find that
${ED} does not exist, bug #368839
---

diff --git a/bin/ebuild-helpers/prepall b/bin/ebuild-helpers/prepall
index bc3362e5c..f9164c18f 100755
--- a/bin/ebuild-helpers/prepall
+++ b/bin/ebuild-helpers/prepall
@@ -4,6 +4,8 @@
 
 source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
 
+[[ -d ${ED} ]] || exit 0
+
 if hasq chflags $FEATURES ; then
 	# Save all the file flags for restoration at the end of prepall.
 	mtree -c -p "${ED}" -k flags > "${T}/bsdflags.mtree"