diff options
Diffstat (limited to 'bin/ebuild-helpers/prepall')
-rwxr-xr-x | bin/ebuild-helpers/prepall | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/ebuild-helpers/prepall b/bin/ebuild-helpers/prepall index 701ecba21..611c4ce79 100755 --- a/bin/ebuild-helpers/prepall +++ b/bin/ebuild-helpers/prepall @@ -4,12 +4,14 @@ source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh +case "$EAPI" in 0|1|2) ED=${D} ;; esac + if has chflags $FEATURES ; then # Save all the file flags for restoration at the end of prepall. - mtree -c -p "${D}" -k flags > "${T}/bsdflags.mtree" + mtree -c -p "${ED}" -k flags > "${T}/bsdflags.mtree" # Remove all the file flags so that prepall can do anything necessary. - chflags -R noschg,nouchg,nosappnd,nouappnd "${D}" - chflags -R nosunlnk,nouunlnk "${D}" 2>/dev/null + chflags -R noschg,nouchg,nosappnd,nouappnd "${ED}" + chflags -R nosunlnk,nouunlnk "${ED}" 2>/dev/null fi prepallman @@ -19,5 +21,5 @@ prepallstrip if has chflags $FEATURES ; then # Restore all the file flags that were saved at the beginning of prepall. - mtree -U -e -p "${D}" -k flags < "${T}/bsdflags.mtree" &> /dev/null + mtree -U -e -p "${ED}" -k flags < "${T}/bsdflags.mtree" &> /dev/null fi |