From 1af0c40b1300651ca03a7509f49f152c1e595736 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 1 Nov 2011 19:17:19 -0700 Subject: Add EPREFIX and ED support in all ebuild helpers. This allows our prefix tests to use helpers like insinto, doins, and dosym. --- bin/ebuild-helpers/prepall | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'bin/ebuild-helpers/prepall') 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 -- cgit v1.2.3-1-g7c22