From ff52f9dc31004becb8022e6437088d01917f413c Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 7 Dec 2011 22:22:31 -0800 Subject: Make USE=prefix enable EPREFIX in all EAPIs. This is safe because the prefix flag should be masked in all non-prefix profiles, and older EAPIs would otherwise be useless with prefix configurations. This brings compatibility with the prefix branch of portage, which also supports EPREFIX for all EAPIs (for obvious reasons). --- bin/misc-functions.sh | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'bin/misc-functions.sh') diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index 1c11dc51a..584d16a00 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -17,7 +17,8 @@ shift $# source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}/ebuild.sh" install_symlink_html_docs() { - case "$EAPI" in 0|1|2) local ED=${D} ;; esac + [[ " ${USE} " == *" prefix "* ]] || \ + case "$EAPI" in 0|1|2) local ED=${D} ;; esac cd "${ED}" || die "cd failed" #symlink the html documentation (if DOC_SYMLINKS_DIR is set in make.conf) if [ -n "${DOC_SYMLINKS_DIR}" ] ; then @@ -65,7 +66,8 @@ canonicalize() { prepcompress() { local -a include exclude incl_d incl_f local f g i real_f real_d - case "$EAPI" in 0|1|2) local ED=${D} ;; esac + [[ " ${USE} " == *" prefix "* ]] || \ + case "$EAPI" in 0|1|2) local ED=${D} ;; esac # Canonicalize path names and check for their existence. real_d=$(canonicalize "${ED}") @@ -147,7 +149,8 @@ prepcompress() { install_qa_check() { local f i x - case "$EAPI" in 0|1|2) local ED=${D} ;; esac + [[ " ${USE} " == *" prefix "* ]] || \ + case "$EAPI" in 0|1|2) local ED=${D} ;; esac cd "${ED}" || die "cd failed" @@ -886,7 +889,8 @@ preinst_mask() { return 1 fi - case "$EAPI" in 0|1|2) local ED=${D} ;; esac + [[ " ${USE} " == *" prefix "* ]] || \ + case "$EAPI" in 0|1|2) local ED=${D} ;; esac # Make sure $PWD is not ${D} so that we don't leave gmon.out files # in there in case any tools were built with -pg in CFLAGS. @@ -914,7 +918,8 @@ preinst_sfperms() { return 1 fi - case "$EAPI" in 0|1|2) local ED=${D} ;; esac + [[ " ${USE} " == *" prefix "* ]] || \ + case "$EAPI" in 0|1|2) local ED=${D} ;; esac # Smart FileSystem Permissions if has sfperms $FEATURES; then @@ -952,7 +957,8 @@ preinst_suid_scan() { return 1 fi - case "$EAPI" in 0|1|2) local ED=${D} ;; esac + [[ " ${USE} " == *" prefix "* ]] || \ + case "$EAPI" in 0|1|2) local ED=${D} ;; esac # total suid control. if has suidctl $FEATURES; then @@ -1017,7 +1023,8 @@ preinst_selinux_labels() { dyn_package() { - case "$EAPI" in 0|1|2) local ED=${D} ;; esac + [[ " ${USE} " == *" prefix "* ]] || \ + case "$EAPI" in 0|1|2) local ED=${D} ;; esac # Make sure $PWD is not ${D} so that we don't leave gmon.out files # in there in case any tools were built with -pg in CFLAGS. @@ -1097,7 +1104,8 @@ __END1__ dyn_rpm() { - case "$EAPI" in 0|1|2) local EPREFIX= ;; esac + [[ " ${USE} " == *" prefix "* ]] || \ + case "$EAPI" in 0|1|2) local EPREFIX= ;; esac cd "${T}" || die "cd failed" local machine_name=$(uname -m) -- cgit v1.2.3-1-g7c22