commit: 1e33abbce732b549dca680682ec7b911d5cede3d
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 25 15:03:27 2022 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Jul 25 15:03:27 2022 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=1e33abbc
bin/ebuild-helpers/doins: fix D, ED, EPREFIX checks
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
bin/ebuild-helpers/doins | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/bin/ebuild-helpers/doins b/bin/ebuild-helpers/doins
index c9c218396..4315a038f 100755
--- a/bin/ebuild-helpers/doins
+++ b/bin/ebuild-helpers/doins
@@ -42,7 +42,8 @@ if ! ___eapi_has_prefix_variables; then
export ED="${D}"
fi
-if [[ ${_E_INSDESTTREE_#${ED}} != "${_E_INSDESTTREE_}" ]]; then
+# PREFIX LOCAL: check D *AND* ED
+if [[ ${_E_INSDESTTREE_#${D}} != "${_E_INSDESTTREE_}" ]]; then
__vecho "-------------------------------------------------------" 1>&2
__vecho "You should not use \${D} or \${ED} with helpers." 1>&2
__vecho " --> ${_E_INSDESTTREE_}" 1>&2
@@ -50,12 +51,15 @@ if [[ ${_E_INSDESTTREE_#${ED}} != "${_E_INSDESTTREE_}" ]];
then
__helpers_die "${helper} used with \${D} or \${ED}"
exit 1
fi
-# PREFIX LOCAL: check for usage with EPREFIX
-if [[ -n ${EPREFIX} && ${INSDESTTREE#${EPREFIX}} != "${INSDESTTREE}" ]]; then
+# BEGIN PREFIX LOCAL: check for usage with EPREFIX
+if [[ -n ${EPREFIX} && \
+ ${_E_INSDESTTREE_#${EPREFIX}} != "${_E_INSDESTTREE_}" ]];
+then
__vecho "-------------------------------------------------------" 1>&2
__vecho "You should not use \${EPREFIX} with helpers." 1>&2
- __vecho " --> ${INSDESTTREE}" 1>&2
+ __vecho " --> ${_E_INSDESTTREE_}" 1>&2
__vecho "-------------------------------------------------------" 1>&2
+ __helpers_die "${helper} used with \${EPREFIX}"
exit 1
fi
# END PREFIX LOCAL