1 |
The eqawarn command is part of EAPI 7, therefore the eclass should not |
2 |
override it. Also we cannot rely on its being a shell function. |
3 |
--- |
4 |
eclass/eutils.eclass | 32 +++++++++++++++++++------------- |
5 |
1 file changed, 19 insertions(+), 13 deletions(-) |
6 |
|
7 |
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass |
8 |
index 9b4767e1874a..e5d0ebeebb06 100644 |
9 |
--- a/eclass/eutils.eclass |
10 |
+++ b/eclass/eutils.eclass |
11 |
@@ -25,19 +25,6 @@ case ${EAPI:-0} in |
12 |
;; |
13 |
esac |
14 |
|
15 |
-# @FUNCTION: eqawarn |
16 |
-# @USAGE: [message] |
17 |
-# @DESCRIPTION: |
18 |
-# Proxy to ewarn for package managers that don't provide eqawarn and use the PM |
19 |
-# implementation if available. Reuses PORTAGE_ELOG_CLASSES as set by the dev |
20 |
-# profile. |
21 |
-if ! declare -F eqawarn >/dev/null ; then |
22 |
- eqawarn() { |
23 |
- has qa ${PORTAGE_ELOG_CLASSES} && ewarn "$@" |
24 |
- : |
25 |
- } |
26 |
-fi |
27 |
- |
28 |
# @FUNCTION: emktemp |
29 |
# @USAGE: [temp dir] |
30 |
# @DESCRIPTION: |
31 |
@@ -415,4 +402,23 @@ in_iuse() { |
32 |
;; |
33 |
esac |
34 |
|
35 |
+case ${EAPI:-0} in |
36 |
+0|1|2|3|4|5|6) |
37 |
+ |
38 |
+# @FUNCTION: eqawarn |
39 |
+# @USAGE: [message] |
40 |
+# @DESCRIPTION: |
41 |
+# Proxy to ewarn for package managers that don't provide eqawarn and use the PM |
42 |
+# implementation if available. Reuses PORTAGE_ELOG_CLASSES as set by the dev |
43 |
+# profile. |
44 |
+if ! declare -F eqawarn >/dev/null ; then |
45 |
+ eqawarn() { |
46 |
+ has qa ${PORTAGE_ELOG_CLASSES} && ewarn "$@" |
47 |
+ : |
48 |
+ } |
49 |
+fi |
50 |
+ |
51 |
+;; |
52 |
+esac |
53 |
+ |
54 |
fi |
55 |
-- |
56 |
2.18.0 |