1 |
bin/ebuild-helpers/doins: fix D check, add EPREFIX check |
2 |
|
3 |
ED = D/EPREFIX, so checking for ED includes EPREFIX, which when this is |
4 |
absent fails to check for D. Simply check for D instead, which catches |
5 |
both the case for D and ED. |
6 |
|
7 |
Add check for usage of EPREFIX, like for using D with helpers. |
8 |
|
9 |
Signed-off-by: Fabian Groffen <grobian@g.o> |
10 |
|
11 |
diff --git a/bin/ebuild-helpers/doins b/bin/ebuild-helpers/doins |
12 |
index 24fe48121..4315a038f 100755 |
13 |
--- a/bin/ebuild-helpers/doins |
14 |
+++ b/bin/ebuild-helpers/doins |
15 |
@@ -42,7 +42,7 @@ if ! ___eapi_has_prefix_variables; then |
16 |
export ED="${D}" |
17 |
fi |
18 |
|
19 |
-if [[ ${_E_INSDESTTREE_#${ED}} != "${_E_INSDESTTREE_}" ]]; then |
20 |
+if [[ ${_E_INSDESTTREE_#${D}} != "${_E_INSDESTTREE_}" ]]; then |
21 |
__vecho "-------------------------------------------------------" 1>&2 |
22 |
__vecho "You should not use \${D} or \${ED} with helpers." 1>&2 |
23 |
__vecho " --> ${_E_INSDESTTREE_}" 1>&2 |
24 |
@@ -50,6 +51,16 @@ if [[ ${_E_INSDESTTREE_#${ED}} != "${_E_INSDESTTREE_}" ]]; then |
25 |
__helpers_die "${helper} used with \${D} or \${ED}" |
26 |
exit 1 |
27 |
fi |
28 |
+if [[ -n ${EPREFIX} && \ |
29 |
+ ${_E_INSDESTTREE_#${EPREFIX}} != "${_E_INSDESTTREE_}" ]]; |
30 |
+then |
31 |
+ __vecho "-------------------------------------------------------" 1>&2 |
32 |
+ __vecho "You should not use \${EPREFIX} with helpers." 1>&2 |
33 |
+ __vecho " --> ${_E_INSDESTTREE_}" 1>&2 |
34 |
+ __vecho "-------------------------------------------------------" 1>&2 |
35 |
+ __helpers_die "${helper} used with \${EPREFIX}" |
36 |
+ exit 1 |
37 |
+fi |
38 |
|
39 |
if ___eapi_doins_and_newins_preserve_symlinks; then |
40 |
DOINS_ARGS+=( --preserve_symlinks ) |
41 |
|
42 |
-- |
43 |
Fabian Groffen |
44 |
Gentoo on a different level |