Support FEATURES=force-prefix.
authorZac Medico <zmedico@gentoo.org>
Thu, 8 Dec 2011 17:46:55 +0000 (09:46 -0800)
committerZac Medico <zmedico@gentoo.org>
Thu, 8 Dec 2011 17:46:55 +0000 (09:46 -0800)
This adjusts the logic from commit
ff52f9dc31004becb8022e6437088d01917f413c to use FEATURES=force-prefix
instead of USE=prefix. This has the advantage that we don't have to
make any assumptions about the USE=prefix.

32 files changed:
bin/ebuild-helpers/dobin
bin/ebuild-helpers/dodir
bin/ebuild-helpers/dodoc
bin/ebuild-helpers/doexe
bin/ebuild-helpers/dohard
bin/ebuild-helpers/doinfo
bin/ebuild-helpers/doins
bin/ebuild-helpers/dolib
bin/ebuild-helpers/doman
bin/ebuild-helpers/domo
bin/ebuild-helpers/dosbin
bin/ebuild-helpers/dosed
bin/ebuild-helpers/dosym
bin/ebuild-helpers/ecompressdir
bin/ebuild-helpers/fowners
bin/ebuild-helpers/fperms
bin/ebuild-helpers/prepall
bin/ebuild-helpers/prepalldocs
bin/ebuild-helpers/prepallinfo
bin/ebuild-helpers/prepallman
bin/ebuild-helpers/prepallstrip
bin/ebuild-helpers/prepinfo
bin/ebuild-helpers/preplib
bin/ebuild-helpers/prepman
bin/ebuild-helpers/prepstrip
bin/ebuild.sh
bin/misc-functions.sh
bin/phase-functions.sh
bin/phase-helpers.sh
man/make.conf.5
pym/portage/const.py
pym/portage/package/ebuild/config.py

index 7ea29d4d4d5d14858b9df3b73640f2ca6f24f449..f90d8933c1646d059b74134fd552980dec39e33d 100755 (executable)
@@ -9,7 +9,7 @@ if [[ $# -lt 1 ]] ; then
        exit 1
 fi
 
-[[ " ${USE} " == *" prefix "* ]] || \
+[[ " ${FEATURES} " == *" force-prefix "* ]] || \
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 if [[ ! -d ${ED}${DESTTREE}/bin ]] ; then
index 5bedd05c9ec6c7efeb29d16e1c47cf15f9ce1cf2..90a3efed494a4d97b1871f60d0f74aea756a0547 100755 (executable)
@@ -4,7 +4,7 @@
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
-[[ " ${USE} " == *" prefix "* ]] || \
+[[ " ${FEATURES} " == *" force-prefix "* ]] || \
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 install -d ${DIROPTIONS} "${@/#/${ED}/}"
index 6280536e5d7efb00e19e8c8c70f680b8f82f338b..1f333a615dff8567749836a413644044af06f35a 100755 (executable)
@@ -9,7 +9,7 @@ if [ $# -lt 1 ] ; then
        exit 1  
 fi
 
-[[ " ${USE} " == *" prefix "* ]] || \
+[[ " ${FEATURES} " == *" force-prefix "* ]] || \
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 dir="${ED}usr/share/doc/${PF}/${_E_DOCDESTTREE_}"
index 65f355af9a377823a12c981fba7a80e2046317fd..fb228f90527682619de1d4fbc2a682bc70f27f53 100755 (executable)
@@ -9,7 +9,7 @@ if [[ $# -lt 1 ]] ; then
        exit 1
 fi
 
-[[ " ${USE} " == *" prefix "* ]] || \
+[[ " ${FEATURES} " == *" force-prefix "* ]] || \
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 if [[ ! -d ${ED}${_E_EXEDESTTREE_} ]] ; then
index 7a6fc76980be4048e93033450b3a799673c8b9f8..b52fd7c006564e1e4e71f8d2431b25d0068e2bbe 100755 (executable)
@@ -7,7 +7,7 @@ if [[ $# -ne 2 ]] ; then
        exit 1
 fi
 
-[[ " ${USE} " == *" prefix "* ]] || \
+[[ " ${FEATURES} " == *" force-prefix "* ]] || \
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 destdir=${2%/*}
index c4b767e9b5deb881b87560d0209772b9d87a3e2e..8fd7d45f8f472337d917e142304c4dd0174546f1 100755 (executable)
@@ -9,7 +9,7 @@ if [[ -z $1 ]] ; then
        exit 1  
 fi
 
-[[ " ${USE} " == *" prefix "* ]] || \
+[[ " ${FEATURES} " == *" force-prefix "* ]] || \
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 if [[ ! -d ${ED}usr/share/info ]] ; then
index c3af28905921f79bf074a77a548480e289a92f3f..443bfdb21b7ebe5af472516279ba6950f525e71b 100755 (executable)
@@ -27,7 +27,7 @@ else
        DOINSRECUR=n
 fi
 
-[[ " ${USE} " == *" prefix "* ]] || \
+[[ " ${FEATURES} " == *" force-prefix "* ]] || \
        case "$EAPI" in 0|1|2) export ED="${D}" ;; esac
 
 if [[ ${INSDESTTREE#${ED}} != "${INSDESTTREE}" ]]; then
index 8357dfaa98c00257a2f18606cbb7988ad2a3ddac..9af54189021d005bb61755d363a267a646850210 100755 (executable)
@@ -4,7 +4,7 @@
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
-[[ " ${USE} " == *" prefix "* ]] || \
+[[ " ${FEATURES} " == *" force-prefix "* ]] || \
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 # Setup ABI cruft
index 817743d7ec7dc01217815831249a7906dc48b9e8..b4047ce40dc0fc78b034493c87c2b4dd0c553094 100755 (executable)
@@ -9,7 +9,7 @@ if [[ $# -lt 1 ]] ; then
        exit 1
 fi
 
-[[ " ${USE} " == *" prefix "* ]] || \
+[[ " ${FEATURES} " == *" force-prefix "* ]] || \
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 i18n=""
index 551785e76513dd60122610e622dd919e687d626a..d994343a9fa398b2be403b1a9c614e4ac63b489c 100755 (executable)
@@ -10,7 +10,7 @@ if [ ${mynum} -lt 1 ] ; then
        exit 1
 fi
 
-[[ " ${USE} " == *" prefix "* ]] || \
+[[ " ${FEATURES} " == *" force-prefix "* ]] || \
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 if [ ! -d "${ED}${DESTTREE}/share/locale" ] ; then
index 5606077541d79db2c40b3b15b719fa905d151a58..d101c8a6db9be943e3b5af0e16c012fa9c0bb69b 100755 (executable)
@@ -9,7 +9,7 @@ if [[ $# -lt 1 ]] ; then
        exit 1
 fi
 
-[[ " ${USE} " == *" prefix "* ]] || \
+[[ " ${FEATURES} " == *" force-prefix "* ]] || \
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 if [[ ! -d ${ED}${DESTTREE}/sbin ]] ; then
index 200b011fb59aa1fe096f60da12c31cbbd9b8919c..f202df7a71221eae74599c90040759e775dd81c9 100755 (executable)
@@ -7,7 +7,7 @@ if [[ $# -lt 1 ]] ; then
        exit 1
 fi
 
-[[ " ${USE} " == *" prefix "* ]] || \
+[[ " ${FEATURES} " == *" force-prefix "* ]] || \
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 ret=0
index 8925001e481912b45ffcae41cdc23faf0db44c7e..5e41ec4563510c960e45d3b5341a3d198741c893 100755 (executable)
@@ -9,7 +9,7 @@ if [[ $# -ne 2 ]] ; then
        exit 1
 fi
 
-[[ " ${USE} " == *" prefix "* ]] || \
+[[ " ${FEATURES} " == *" force-prefix "* ]] || \
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 if [[ ${2} == */ ]] || \
index 937ba268bfac8e695f0b159b98c16880bfa0d3dc..5ba44d755220a18a0454d7fa9c1ef6043db420a5 100755 (executable)
@@ -9,7 +9,7 @@ if [[ -z $1 ]] ; then
        exit 1
 fi
 
-[[ " ${USE} " == *" prefix "* ]] || \
+[[ " ${FEATURES} " == *" force-prefix "* ]] || \
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 case $1 in
index b3e4555cd26ef0a4604476dd02609258410f8273..a5a28f2fb08231f42cbcd476a91876ce306d22ed 100755 (executable)
@@ -4,7 +4,7 @@
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
-[[ " ${USE} " == *" prefix "* ]] || \
+[[ " ${FEATURES} " == *" force-prefix "* ]] || \
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 # we can't prefix all arguments because
index 207cf54a586f6ede578003976f91d8061710e70d..a2f77ea002d0c8b38f8391e144bf5be1a71ea08d 100755 (executable)
@@ -4,7 +4,7 @@
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
-[[ " ${USE} " == *" prefix "* ]] || \
+[[ " ${FEATURES} " == *" force-prefix "* ]] || \
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 # we can't prefix all arguments because
index 512feb33a98d04c3998590d14f821d01d35c37dd..49e646cd280081c9979a4f069291cda86922698b 100755 (executable)
@@ -4,7 +4,7 @@
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
-[[ " ${USE} " == *" prefix "* ]] || \
+[[ " ${FEATURES} " == *" force-prefix "* ]] || \
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 if has chflags $FEATURES ; then
index 1d0224981ba5a0480f462ef9c858c4b5aa34f6ca..560a02bcbc9620c94a005cb28275afa819a913b4 100755 (executable)
@@ -8,7 +8,7 @@ if [[ -n $1 ]] ; then
        vecho "${0##*/}: invalid usage; takes no arguments" 1>&2
 fi
 
-[[ " ${USE} " == *" prefix "* ]] || \
+[[ " ${FEATURES} " == *" force-prefix "* ]] || \
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 [[ -d ${ED}usr/share/doc ]] || exit 0
index 183e1ca62057d5057c10ec2838b805de7b108486..db9bbfacb0e8f1c021c15e04402b43485cfaf551 100755 (executable)
@@ -4,7 +4,7 @@
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
-[[ " ${USE} " == *" prefix "* ]] || \
+[[ " ${FEATURES} " == *" force-prefix "* ]] || \
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 [[ -d ${ED}usr/share/info ]] || exit 0
index a5699c2f15805a32bd353874477786c04be5be34..dee1c7236e4466e0b92fbf9b5cfa64378473ee7c 100755 (executable)
@@ -7,7 +7,7 @@ source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 # replaced by controllable compression in EAPI 4
 has "${EAPI}" 0 1 2 3 || exit 0
 
-[[ " ${USE} " == *" prefix "* ]] || \
+[[ " ${FEATURES} " == *" force-prefix "* ]] || \
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 ret=0
index 6032b48c922e797df5cb12da25a3ae87d18f6fd9..28320d975ae9b5035cd32f91102e552191060901 100755 (executable)
@@ -2,7 +2,7 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-[[ " ${USE} " == *" prefix "* ]] || \
+[[ " ${FEATURES} " == *" force-prefix "* ]] || \
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 exec prepstrip "${ED}"
index 7c60d9b86c063994d0d4b612d846641d128b0d62..ffe2ecec30bac2f77c3360fdd32bcee1e6972779 100755 (executable)
@@ -4,7 +4,7 @@
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
-[[ " ${USE} " == *" prefix "* ]] || \
+[[ " ${FEATURES} " == *" force-prefix "* ]] || \
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 if [[ -z $1 ]] ; then
index cbff76d4c7fe95cd1414a5b38c1216aadef80a87..6e91cf33d02a15015b4a493a31ee6569d6c770be 100755 (executable)
@@ -6,7 +6,7 @@ source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 eqawarn "QA Notice: Deprecated call to 'preplib'"
 
-[[ " ${USE} " == *" prefix "* ]] || \
+[[ " ${FEATURES} " == *" force-prefix "* ]] || \
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 LIBDIR_VAR="LIBDIR_${ABI}"
index 18c0f992ae2e7e476ef373192185d3bb4fe9d3c5..f96b64147dbcccce1a65cace7f3ad0c17028e78f 100755 (executable)
@@ -4,7 +4,7 @@
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
-[[ " ${USE} " == *" prefix "* ]] || \
+[[ " ${FEATURES} " == *" force-prefix "* ]] || \
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 if [[ -z $1 ]] ; then 
index 085c93d56b9a72e6153a72d78b4dead1ef4ec100..15eed845784c289e82da3b39f712c8c20428d20f 100755 (executable)
@@ -18,7 +18,7 @@ exp_tf() {
 exp_tf FEATURES installsources nostrip splitdebug
 exp_tf RESTRICT binchecks installsources strip
 
-[[ " ${USE} " == *" prefix "* ]] || \
+[[ " ${FEATURES} " == *" force-prefix "* ]] || \
        case "$EAPI" in 0|1|2) ED=${D} ;; esac
 
 banner=false
index d77b52c853d4400f19115bce2624159d8c064cd6..1f95adb8215f5d469a6ea10939488c3deb87ff8c 100755 (executable)
@@ -670,7 +670,7 @@ else
        declare -r $PORTAGE_READONLY_METADATA $PORTAGE_READONLY_VARS
        case "$EAPI" in
                0|1|2)
-                       [[ " ${USE} " == *" prefix "* ]] && \
+                       [[ " ${FEATURES} " == *" force-prefix "* ]] && \
                                declare -r ED EPREFIX EROOT
                        ;;
                *)
index 584d16a00613a51cdd74f602ab1835e17c835803..358288932cb908d9aac4f89f94b4816c934390d6 100755 (executable)
@@ -17,7 +17,7 @@ shift $#
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}/ebuild.sh"
 
 install_symlink_html_docs() {
-       [[ " ${USE} " == *" prefix "* ]] || \
+       [[ " ${FEATURES} " == *" force-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)
@@ -66,7 +66,7 @@ canonicalize() {
 prepcompress() {
        local -a include exclude incl_d incl_f
        local f g i real_f real_d
-       [[ " ${USE} " == *" prefix "* ]] || \
+       [[ " ${FEATURES} " == *" force-prefix "* ]] || \
                case "$EAPI" in 0|1|2) local ED=${D} ;; esac
 
        # Canonicalize path names and check for their existence.
@@ -149,7 +149,7 @@ prepcompress() {
 
 install_qa_check() {
        local f i x
-       [[ " ${USE} " == *" prefix "* ]] || \
+       [[ " ${FEATURES} " == *" force-prefix "* ]] || \
                case "$EAPI" in 0|1|2) local ED=${D} ;; esac
 
        cd "${ED}" || die "cd failed"
@@ -889,7 +889,7 @@ preinst_mask() {
                 return 1
        fi
 
-       [[ " ${USE} " == *" prefix "* ]] || \
+       [[ " ${FEATURES} " == *" force-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
@@ -918,7 +918,7 @@ preinst_sfperms() {
                 return 1
        fi
 
-       [[ " ${USE} " == *" prefix "* ]] || \
+       [[ " ${FEATURES} " == *" force-prefix "* ]] || \
                case "$EAPI" in 0|1|2) local ED=${D} ;; esac
 
        # Smart FileSystem Permissions
@@ -957,7 +957,7 @@ preinst_suid_scan() {
                 return 1
        fi
 
-       [[ " ${USE} " == *" prefix "* ]] || \
+       [[ " ${FEATURES} " == *" force-prefix "* ]] || \
                case "$EAPI" in 0|1|2) local ED=${D} ;; esac
 
        # total suid control.
@@ -1023,7 +1023,7 @@ preinst_selinux_labels() {
 
 dyn_package() {
 
-       [[ " ${USE} " == *" prefix "* ]] || \
+       [[ " ${FEATURES} " == *" force-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
@@ -1104,7 +1104,7 @@ __END1__
 
 dyn_rpm() {
 
-       [[ " ${USE} " == *" prefix "* ]] || \
+       [[ " ${FEATURES} " == *" force-prefix "* ]] || \
                case "$EAPI" in 0|1|2) local EPREFIX= ;; esac
 
        cd "${T}" || die "cd failed"
index 2302910653990d919a57c9a51908a427b3786ee1..b1942429199d606bfc3e5d49742727842b86730f 100644 (file)
@@ -96,7 +96,7 @@ filter_readonly_variables() {
        # supported by the current EAPI.
        case "${EAPI:-0}" in
                0|1|2)
-                       [[ " ${USE} " == *" prefix "* ]] && \
+                       [[ " ${FEATURES} " == *" force-prefix "* ]] && \
                                filtered_vars+=" ED EPREFIX EROOT"
                        ;;
                *)
@@ -502,7 +502,7 @@ dyn_install() {
        ebuild_phase pre_src_install
 
        _x=${ED}
-       [[ " ${USE} " == *" prefix "* ]] || \
+       [[ " ${FEATURES} " == *" force-prefix "* ]] || \
                case "$EAPI" in 0|1|2) _x=${D} ;; esac
        rm -rf "${D}"
        mkdir -p "${_x}"
@@ -564,7 +564,7 @@ dyn_install() {
        # work in a different EPREFIX from the one is was built for.
        case "${EAPI:-0}" in
                0|1|2)
-                       [[ " ${USE} " == *" prefix "* ]] && \
+                       [[ " ${FEATURES} " == *" force-prefix "* ]] && \
                                [ -n "${EPREFIX}" ] && echo "${EPREFIX}" > EPREFIX
                        ;;
                *)
index aadfac17dca0f7f14b1acf928a3011ba0da7b5a8..969cecfe0468829ef81aa3161f9e3b0797d33317 100644 (file)
@@ -19,7 +19,7 @@ into() {
                export DESTTREE=""
        else
                export DESTTREE=$1
-               [[ " ${USE} " == *" prefix "* ]] || \
+               [[ " ${FEATURES} " == *" force-prefix "* ]] || \
                        case "$EAPI" in 0|1|2) local ED=${D} ;; esac
                if [ ! -d "${ED}${DESTTREE}" ]; then
                        install -d "${ED}${DESTTREE}"
@@ -37,7 +37,7 @@ insinto() {
                export INSDESTTREE=""
        else
                export INSDESTTREE=$1
-               [[ " ${USE} " == *" prefix "* ]] || \
+               [[ " ${FEATURES} " == *" force-prefix "* ]] || \
                        case "$EAPI" in 0|1|2) local ED=${D} ;; esac
                if [ ! -d "${ED}${INSDESTTREE}" ]; then
                        install -d "${ED}${INSDESTTREE}"
@@ -55,7 +55,7 @@ exeinto() {
                export _E_EXEDESTTREE_=""
        else
                export _E_EXEDESTTREE_="$1"
-               [[ " ${USE} " == *" prefix "* ]] || \
+               [[ " ${FEATURES} " == *" force-prefix "* ]] || \
                        case "$EAPI" in 0|1|2) local ED=${D} ;; esac
                if [ ! -d "${ED}${_E_EXEDESTTREE_}" ]; then
                        install -d "${ED}${_E_EXEDESTTREE_}"
@@ -73,7 +73,7 @@ docinto() {
                export _E_DOCDESTTREE_=""
        else
                export _E_DOCDESTTREE_="$1"
-               [[ " ${USE} " == *" prefix "* ]] || \
+               [[ " ${FEATURES} " == *" force-prefix "* ]] || \
                        case "$EAPI" in 0|1|2) local ED=${D} ;; esac
                if [ ! -d "${ED}usr/share/doc/${PF}/${_E_DOCDESTTREE_}" ]; then
                        install -d "${ED}usr/share/doc/${PF}/${_E_DOCDESTTREE_}"
@@ -141,7 +141,7 @@ docompress() {
 keepdir() {
        dodir "$@"
        local x
-       [[ " ${USE} " == *" prefix "* ]] || \
+       [[ " ${FEATURES} " == *" force-prefix "* ]] || \
                case "$EAPI" in 0|1|2) local ED=${D} ;; esac
        if [ "$1" == "-R" ] || [ "$1" == "-r" ]; then
                shift
@@ -379,7 +379,7 @@ unpack() {
 econf() {
        local x
 
-       [[ " ${USE} " == *" prefix "* ]] || \
+       [[ " ${FEATURES} " == *" force-prefix "* ]] || \
                case "$EAPI" in 0|1|2) local EPREFIX= ;; esac
 
        _hasg() {
@@ -476,7 +476,7 @@ econf() {
 einstall() {
        # CONF_PREFIX is only set if they didn't pass in libdir above.
        local LOCAL_EXTRA_EINSTALL="${EXTRA_EINSTALL}"
-       [[ " ${USE} " == *" prefix "* ]] || \
+       [[ " ${FEATURES} " == *" force-prefix "* ]] || \
                case "$EAPI" in 0|1|2) local ED=${D} ;; esac
        LIBDIR_VAR="LIBDIR_${ABI}"
        if [ -n "${ABI}" -a -n "${!LIBDIR_VAR}" ]; then
@@ -607,7 +607,7 @@ has_version() {
        local eroot
        case "$EAPI" in
                0|1|2)
-                       [[ " ${USE} " == *" prefix "* ]] && \
+                       [[ " ${FEATURES} " == *" force-prefix "* ]] && \
                                eroot=${ROOT%/}${EPREFIX}/ || eroot=${ROOT}
                        ;;
                *)
@@ -642,7 +642,7 @@ best_version() {
        local eroot
        case "$EAPI" in
                0|1|2)
-                       [[ " ${USE} " == *" prefix "* ]] && \
+                       [[ " ${FEATURES} " == *" force-prefix "* ]] && \
                                eroot=${ROOT%/}${EPREFIX}/ || eroot=${ROOT}
                        ;;
                *)
index d70d7b8e88f652fb60aff85fc622fc1f44b20428..9e517e52caa47921b221774bb8ddbc01c7ecff34 100644 (file)
@@ -322,6 +322,12 @@ fixes (order of flags, duplicated entries, ...)
 Only fetch files from configured mirrors, ignoring \fBSRC_URI\fR,
 except when \fImirror\fR is in the \fBebuild\fR(5) \fBRESTRICT\fR variable.
 .TP
+.B force\-prefix
+Enable prefix support for all ebuilds, regardless of EAPI, since 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).
+.TP
 .B lmirror
 When \fImirror\fR is enabled in \fBFEATURES\fR, fetch files even
 when \fImirror\fR is also in the \fBebuild\fR(5) \fBRESTRICT\fR variable.
index 29c3878a6a41ad25246ac7b511312437e4ff6c2f..3dad36a2efea41eb1f8e67676c55ffbd174c4b8a 100644 (file)
@@ -90,7 +90,7 @@ SUPPORTED_FEATURES       = frozenset([
                            "ccache", "chflags", "clean-logs",
                            "collision-protect", "compress-build-logs",
                            "digest", "distcc", "distcc-pump", "distlocks", "ebuild-locks", "fakeroot",
-                           "fail-clean", "force-mirror", "getbinpkg",
+                           "fail-clean", "force-mirror", "force-prefix", "getbinpkg",
                            "installsources", "keeptemp", "keepwork", "fixlafiles", "lmirror",
                            "metadata-transfer", "mirror", "multilib-strict", "news",
                            "noauto", "noclean", "nodoc", "noinfo", "noman",
index 1ccaee7c8f7263b0a41fba19484bf8e32be59bbc..fb79e5ee1c2a239219457ae50478685eb4ca4825 100644 (file)
@@ -2238,17 +2238,14 @@ class config(object):
                if not eapi_exports_merge_type(eapi):
                        mydict.pop("MERGE_TYPE", None)
 
-               # Prefix variables are supported beginning with EAPI 3, or when EPREFIX
-               # is non-empty (implying that EPREFIX support is required in the
-               # current environment, regardless of EAPI). For EAPIs prior to 3,
-               # ebuild helpers rely on these variables only when USE=prefix is
-               # enabled. 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).
+               # Prefix variables are supported beginning with EAPI 3, or when
+               # force-prefix is in FEATURES, since 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).
                if phase == 'depend' or eapi is None or \
-                       (not eapi_supports_prefix(eapi) and not mydict.get("EPREFIX")):
+                       ('force-prefix' not in self.features and
+                       not eapi_supports_prefix(eapi)):
                        mydict.pop("ED", None)
                        mydict.pop("EPREFIX", None)
                        mydict.pop("EROOT", None)