diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-12-07 22:22:31 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-12-07 22:22:31 -0800 |
commit | ff52f9dc31004becb8022e6437088d01917f413c (patch) | |
tree | 0f333c6bf4c09f751d993ef843089f8b5c80ef2e /bin/misc-functions.sh | |
parent | c93a46851c43f7e8539a67b2376dc8f55af41789 (diff) | |
download | portage-ff52f9dc31004becb8022e6437088d01917f413c.tar.gz portage-ff52f9dc31004becb8022e6437088d01917f413c.tar.bz2 portage-ff52f9dc31004becb8022e6437088d01917f413c.zip |
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).
Diffstat (limited to 'bin/misc-functions.sh')
-rwxr-xr-x | bin/misc-functions.sh | 24 |
1 files changed, 16 insertions, 8 deletions
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) |