diff options
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) |