diff options
Diffstat (limited to 'bin/ebuild-helpers')
27 files changed, 133 insertions, 128 deletions
diff --git a/bin/ebuild-helpers/dobin b/bin/ebuild-helpers/dobin index 06ae0c779..0ba1eb0c4 100755 --- a/bin/ebuild-helpers/dobin +++ b/bin/ebuild-helpers/dobin @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh @@ -9,8 +9,9 @@ if [[ $# -lt 1 ]] ; then exit 1 fi -[[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) ED=${D} ;; esac +if ! ___eapi_has_prefix_variables; then + ED=${D} +fi if [[ ! -d ${ED}${DESTTREE}/bin ]] ; then install -d "${ED}${DESTTREE}/bin" || { __helpers_die "${0##*/}: failed to install ${ED}${DESTTREE}/bin"; exit 2; } diff --git a/bin/ebuild-helpers/dodir b/bin/ebuild-helpers/dodir index c8f763deb..e03ba9a58 100755 --- a/bin/ebuild-helpers/dodir +++ b/bin/ebuild-helpers/dodir @@ -1,11 +1,12 @@ #!/bin/bash -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh -[[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) ED=${D} ;; esac +if ! ___eapi_has_prefix_variables; then + ED=${D} +fi install -d ${DIROPTIONS} "${@/#/${ED}/}" ret=$? diff --git a/bin/ebuild-helpers/dodoc b/bin/ebuild-helpers/dodoc index 2b0533feb..bba790384 100755 --- a/bin/ebuild-helpers/dodoc +++ b/bin/ebuild-helpers/dodoc @@ -2,16 +2,12 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -case "${EAPI}" in - 0|1|2|3) - ;; - *) - exec \ - env \ - __PORTAGE_HELPER="dodoc" \ - doins "$@" - ;; -esac +if ___eapi_dodoc_supports_-r; then + exec \ + env \ + __PORTAGE_HELPER="dodoc" \ + doins "$@" +fi source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh @@ -20,8 +16,9 @@ if [ $# -lt 1 ] ; then exit 1 fi -[[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) ED=${D} ;; esac +if ! ___eapi_has_prefix_variables; then + ED=${D} +fi dir="${ED}usr/share/doc/${PF}/${_E_DOCDESTTREE_}" if [ ! -d "${dir}" ] ; then diff --git a/bin/ebuild-helpers/doexe b/bin/ebuild-helpers/doexe index efbf638fc..aa050e9ed 100755 --- a/bin/ebuild-helpers/doexe +++ b/bin/ebuild-helpers/doexe @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh @@ -9,8 +9,9 @@ if [[ $# -lt 1 ]] ; then exit 1 fi -[[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) ED=${D} ;; esac +if ! ___eapi_has_prefix_variables; then + ED=${D} +fi if [[ ! -d ${ED}${_E_EXEDESTTREE_} ]] ; then install -d "${ED}${_E_EXEDESTTREE_}" diff --git a/bin/ebuild-helpers/dohard b/bin/ebuild-helpers/dohard index 6ae93d240..e0a44faf1 100755 --- a/bin/ebuild-helpers/dohard +++ b/bin/ebuild-helpers/dohard @@ -2,22 +2,21 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -case "${EAPI}" in - 0|1|2|3) - ;; - *) - die "'${0##*/}' has been banned for EAPI '$EAPI'" - exit 1 - ;; -esac +source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh + +if ! ___eapi_has_dohard; then + die "'${0##*/}' has been banned for EAPI '$EAPI'" + exit 1 +fi if [[ $# -ne 2 ]] ; then echo "$0: two arguments needed" 1>&2 exit 1 fi -[[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) ED=${D} ;; esac +if ! ___eapi_has_prefix_variables; then + ED=${D} +fi destdir=${2%/*} [[ ! -d ${ED}${destdir} ]] && dodir "${destdir}" diff --git a/bin/ebuild-helpers/doheader b/bin/ebuild-helpers/doheader index db3a02d09..37953658b 100755 --- a/bin/ebuild-helpers/doheader +++ b/bin/ebuild-helpers/doheader @@ -4,11 +4,9 @@ source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh -case "${EAPI}" in - 0|1|2|3|4|4-python|4-slot-abi) - die "${0##*/} is not supported in EAPI ${EAPI}" - ;; -esac +if ! ___eapi_has_doheader; then + die "${0##*/} is not supported in EAPI ${EAPI}" +fi if [[ $# -lt 1 ]] || [[ $1 == -r && $# -lt 2 ]] ; then __helpers_die "${0##*/}: at least one argument needed" diff --git a/bin/ebuild-helpers/doinfo b/bin/ebuild-helpers/doinfo index e4ccc90d9..355047f73 100755 --- a/bin/ebuild-helpers/doinfo +++ b/bin/ebuild-helpers/doinfo @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh @@ -9,8 +9,9 @@ if [[ -z $1 ]] ; then exit 1 fi -[[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) ED=${D} ;; esac +if ! ___eapi_has_prefix_variables; then + ED=${D} +fi if [[ ! -d ${ED}usr/share/info ]] ; then install -d "${ED}usr/share/info" || { __helpers_die "${0##*/}: failed to install ${ED}usr/share/info"; exit 1; } diff --git a/bin/ebuild-helpers/doins b/bin/ebuild-helpers/doins index c534f3f39..4679e83a9 100755 --- a/bin/ebuild-helpers/doins +++ b/bin/ebuild-helpers/doins @@ -29,8 +29,9 @@ else DOINSRECUR=n fi -[[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) export ED="${D}" ;; esac +if ! ___eapi_has_prefix_variables; then + export ED="${D}" +fi if [[ ${INSDESTTREE#${ED}} != "${INSDESTTREE}" ]]; then __vecho "-------------------------------------------------------" 1>&2 @@ -41,14 +42,11 @@ if [[ ${INSDESTTREE#${ED}} != "${INSDESTTREE}" ]]; then exit 1 fi -case "$EAPI" in - 0|1|2|3) - PRESERVE_SYMLINKS=n - ;; - *) - PRESERVE_SYMLINKS=y - ;; -esac +if ___eapi_doins_and_newins_preserve_symlinks; then + PRESERVE_SYMLINKS=y +else + PRESERVE_SYMLINKS=n +fi export TMP=$T/.doins_tmp # Use separate directories to avoid potential name collisions. diff --git a/bin/ebuild-helpers/dolib b/bin/ebuild-helpers/dolib index 402965de7..fd92d7f03 100755 --- a/bin/ebuild-helpers/dolib +++ b/bin/ebuild-helpers/dolib @@ -1,11 +1,12 @@ #!/bin/bash -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh -[[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) ED=${D} ;; esac +if ! ___eapi_has_prefix_variables; then + ED=${D} +fi # Setup ABI cruft LIBDIR_VAR="LIBDIR_${ABI}" diff --git a/bin/ebuild-helpers/doman b/bin/ebuild-helpers/doman index c10296b34..d6808597a 100755 --- a/bin/ebuild-helpers/doman +++ b/bin/ebuild-helpers/doman @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh @@ -9,8 +9,9 @@ if [[ $# -lt 1 ]] ; then exit 1 fi -[[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) ED=${D} ;; esac +if ! ___eapi_has_prefix_variables; then + ED=${D} +fi i18n="" diff --git a/bin/ebuild-helpers/domo b/bin/ebuild-helpers/domo index 840b2de4c..9a8dda38a 100755 --- a/bin/ebuild-helpers/domo +++ b/bin/ebuild-helpers/domo @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh @@ -10,8 +10,9 @@ if [ ${mynum} -lt 1 ] ; then exit 1 fi -[[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) ED=${D} ;; esac +if ! ___eapi_has_prefix_variables; then + ED=${D} +fi if [ ! -d "${ED}${DESTTREE}/share/locale" ] ; then install -d "${ED}${DESTTREE}/share/locale/" diff --git a/bin/ebuild-helpers/dosbin b/bin/ebuild-helpers/dosbin index edc458465..361ca83ca 100755 --- a/bin/ebuild-helpers/dosbin +++ b/bin/ebuild-helpers/dosbin @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh @@ -9,8 +9,9 @@ if [[ $# -lt 1 ]] ; then exit 1 fi -[[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) ED=${D} ;; esac +if ! ___eapi_has_prefix_variables; then + ED=${D} +fi if [[ ! -d ${ED}${DESTTREE}/sbin ]] ; then install -d "${ED}${DESTTREE}/sbin" || { __helpers_die "${0##*/}: failed to install ${ED}${DESTTREE}/sbin"; exit 2; } diff --git a/bin/ebuild-helpers/dosed b/bin/ebuild-helpers/dosed index 24ec20587..7db062963 100755 --- a/bin/ebuild-helpers/dosed +++ b/bin/ebuild-helpers/dosed @@ -2,22 +2,21 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -case "${EAPI}" in - 0|1|2|3) - ;; - *) - die "'${0##*/}' has been banned for EAPI '$EAPI'" - exit 1 - ;; -esac +source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh + +if ! ___eapi_has_dosed; then + die "'${0##*/}' has been banned for EAPI '$EAPI'" + exit 1 +fi if [[ $# -lt 1 ]] ; then echo "!!! ${0##*/}: at least one argument needed" >&2 exit 1 fi -[[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) ED=${D} ;; esac +if ! ___eapi_has_prefix_variables; then + ED=${D} +fi ret=0 file_found=0 diff --git a/bin/ebuild-helpers/dosym b/bin/ebuild-helpers/dosym index 34637c2f7..649b100de 100755 --- a/bin/ebuild-helpers/dosym +++ b/bin/ebuild-helpers/dosym @@ -9,8 +9,9 @@ if [[ $# -ne 2 ]] ; then exit 1 fi -[[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) ED=${D} ;; esac +if ! ___eapi_has_prefix_variables; then + ED=${D} +fi if [[ ${2} == */ ]] || \ [[ -d ${ED}${2} && ! -L ${ED}${2} ]] ; then diff --git a/bin/ebuild-helpers/ecompressdir b/bin/ebuild-helpers/ecompressdir index 097ade2bc..75f3e3a25 100755 --- a/bin/ebuild-helpers/ecompressdir +++ b/bin/ebuild-helpers/ecompressdir @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/helper-functions.sh @@ -9,8 +9,9 @@ if [[ -z $1 ]] ; then exit 1 fi -[[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) ED=${D} EPREFIX= ;; esac +if ! ___eapi_has_prefix_variables; then + ED=${D} EPREFIX= +fi case $1 in --ignore) diff --git a/bin/ebuild-helpers/fowners b/bin/ebuild-helpers/fowners index 5b93fd3c3..b664ec766 100755 --- a/bin/ebuild-helpers/fowners +++ b/bin/ebuild-helpers/fowners @@ -4,8 +4,9 @@ source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh -[[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) EPREFIX= ED=${D} ;; esac +if ! ___eapi_has_prefix_variables; then + EPREFIX= ED=${D} +fi # we can't prefix all arguments because # chown takes random options diff --git a/bin/ebuild-helpers/fperms b/bin/ebuild-helpers/fperms index 668e905a2..d854ebbdf 100755 --- a/bin/ebuild-helpers/fperms +++ b/bin/ebuild-helpers/fperms @@ -1,11 +1,12 @@ #!/bin/bash -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh -[[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) ED=${D} ;; esac +if ! ___eapi_has_prefix_variables; then + ED=${D} +fi # we can't prefix all arguments because # chmod takes random options diff --git a/bin/ebuild-helpers/newins b/bin/ebuild-helpers/newins index 20c68a1e2..3538f7060 100755 --- a/bin/ebuild-helpers/newins +++ b/bin/ebuild-helpers/newins @@ -15,10 +15,9 @@ fi eqawarn "QA Notice: ${helper} called with more than 2 arguments: ${@:3}" stdin= -case "${EAPI}" in - 0|1|2|3|4|4-python|4-slot-abi) ;; - *) [[ $1 = "-" ]] && stdin=yes ;; -esac +if ___eapi_newins_supports_reading_from_standard_input && [[ $1 == "-" ]]; then + stdin=yes +fi rm -rf "${T}/$2" @@ -37,13 +36,9 @@ else cp_args="-f" if [[ ${helper} == newins ]] ; then - case "${EAPI}" in - 0|1|2|3) - ;; - *) - cp_args+=" -P" - ;; - esac + if ___eapi_doins_and_newins_preserve_symlinks; then + cp_args+=" -P" + fi fi cp ${cp_args} "$1" "${T}/$2" diff --git a/bin/ebuild-helpers/prepall b/bin/ebuild-helpers/prepall index 49e646cd2..fb5c2db55 100755 --- a/bin/ebuild-helpers/prepall +++ b/bin/ebuild-helpers/prepall @@ -1,11 +1,12 @@ #!/bin/bash -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh -[[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) ED=${D} ;; esac +if ! ___eapi_has_prefix_variables; then + ED=${D} +fi if has chflags $FEATURES ; then # Save all the file flags for restoration at the end of prepall. diff --git a/bin/ebuild-helpers/prepalldocs b/bin/ebuild-helpers/prepalldocs index 50b0c7070..b76f08439 100755 --- a/bin/ebuild-helpers/prepalldocs +++ b/bin/ebuild-helpers/prepalldocs @@ -4,21 +4,18 @@ source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh -case "${EAPI}" in - 0|1|2|3) - ;; - *) - die "'${0##*/}' has been banned for EAPI '$EAPI'" - exit 1 - ;; -esac +if ! ___eapi_has_docompress; then + die "'${0##*/}' has been banned for EAPI '$EAPI'" + exit 1 +fi if [[ -n $1 ]] ; then __vecho "${0##*/}: invalid usage; takes no arguments" 1>&2 fi -[[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) ED=${D} ;; esac +if ! ___eapi_has_prefix_variables; then + ED=${D} +fi [[ -d ${ED}usr/share/doc ]] || exit 0 diff --git a/bin/ebuild-helpers/prepallinfo b/bin/ebuild-helpers/prepallinfo index db9bbfacb..1a2027580 100755 --- a/bin/ebuild-helpers/prepallinfo +++ b/bin/ebuild-helpers/prepallinfo @@ -1,11 +1,12 @@ #!/bin/bash -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh -[[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) ED=${D} ;; esac +if ! ___eapi_has_prefix_variables; then + ED=${D} +fi [[ -d ${ED}usr/share/info ]] || exit 0 diff --git a/bin/ebuild-helpers/prepallman b/bin/ebuild-helpers/prepallman index dee1c7236..7c78324cd 100755 --- a/bin/ebuild-helpers/prepallman +++ b/bin/ebuild-helpers/prepallman @@ -1,14 +1,15 @@ #!/bin/bash -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 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 +___eapi_has_docompress && exit 0 -[[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) ED=${D} ;; esac +if ! ___eapi_has_prefix_variables; then + ED=${D} +fi ret=0 diff --git a/bin/ebuild-helpers/prepallstrip b/bin/ebuild-helpers/prepallstrip index 28320d975..1aa6686cd 100755 --- a/bin/ebuild-helpers/prepallstrip +++ b/bin/ebuild-helpers/prepallstrip @@ -1,8 +1,11 @@ #!/bin/bash -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -[[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) ED=${D} ;; esac +source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh + +if ! ___eapi_has_prefix_variables; then + ED=${D} +fi exec prepstrip "${ED}" diff --git a/bin/ebuild-helpers/prepinfo b/bin/ebuild-helpers/prepinfo index e213f32d1..5afc18a71 100755 --- a/bin/ebuild-helpers/prepinfo +++ b/bin/ebuild-helpers/prepinfo @@ -1,11 +1,12 @@ #!/bin/bash -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh -[[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) ED=${D} ;; esac +if ! ___eapi_has_prefix_variables; then + ED=${D} +fi if [[ -z $1 ]] ; then infodir="/usr/share/info" @@ -33,5 +34,5 @@ find "${ED}${infodir}" -type d -print0 | while read -r -d $'\0' x ; do rm -f "${x}"/dir{,.info}{,.gz,.bz2} done -has "${EAPI}" 0 1 2 3 || exit 0 +___eapi_has_docompress && exit 0 exec ecompressdir --queue "${infodir}" diff --git a/bin/ebuild-helpers/preplib b/bin/ebuild-helpers/preplib index 6e91cf33d..764261d98 100755 --- a/bin/ebuild-helpers/preplib +++ b/bin/ebuild-helpers/preplib @@ -1,13 +1,14 @@ #!/bin/bash -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh eqawarn "QA Notice: Deprecated call to 'preplib'" -[[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) ED=${D} ;; esac +if ! ___eapi_has_prefix_variables; then + ED=${D} +fi LIBDIR_VAR="LIBDIR_${ABI}" if [ -n "${ABI}" -a -n "${!LIBDIR_VAR}" ]; then diff --git a/bin/ebuild-helpers/prepman b/bin/ebuild-helpers/prepman index f96b64147..142d40443 100755 --- a/bin/ebuild-helpers/prepman +++ b/bin/ebuild-helpers/prepman @@ -1,11 +1,12 @@ #!/bin/bash -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh -[[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) ED=${D} ;; esac +if ! ___eapi_has_prefix_variables; then + ED=${D} +fi if [[ -z $1 ]] ; then mandir="${ED}usr/share/man" @@ -19,7 +20,7 @@ if [[ ! -d ${mandir} ]] ; then fi # replaced by controllable compression in EAPI 4 -has "${EAPI}" 0 1 2 3 || exit 0 +___eapi_has_docompress && exit 0 shopt -s nullglob diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip index 802fdd826..0d1ce5a09 100755 --- a/bin/ebuild-helpers/prepstrip +++ b/bin/ebuild-helpers/prepstrip @@ -18,8 +18,9 @@ exp_tf() { exp_tf FEATURES compressdebug installsources nostrip splitdebug exp_tf RESTRICT binchecks installsources strip -[[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "${EAPI}" in 0|1|2) EPREFIX= ED=${D} ;; esac +if ! ___eapi_has_prefix_variables; then + EPREFIX= ED=${D} +fi banner=false SKIP_STRIP=false |