prepall: don't operate on ${ED} when it doesn't exist
authorFabian Groffen <grobian@gentoo.org>
Sun, 29 May 2011 09:00:46 +0000 (11:00 +0200)
committerFabian Groffen <grobian@gentoo.org>
Sun, 29 May 2011 09:00:46 +0000 (11:00 +0200)
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

bin/ebuild-helpers/prepall

index bc3362e5c43b8b4a2a1d22e7dd823cd8a228760a..f9164c18f27ceafc7498c6f881e7c97e990d38ea 100755 (executable)
@@ -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"