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
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"