1 |
Signed-off-by: Ulrich Müller <ulm@g.o> |
2 |
--- |
3 |
eclass/eqawarn.eclass | 26 ++++++++++++++++++++++++++ |
4 |
eclass/eutils.eclass | 15 +-------------- |
5 |
2 files changed, 27 insertions(+), 14 deletions(-) |
6 |
create mode 100644 eclass/eqawarn.eclass |
7 |
|
8 |
diff --git a/eclass/eqawarn.eclass b/eclass/eqawarn.eclass |
9 |
new file mode 100644 |
10 |
index 000000000000..288976182fb3 |
11 |
--- /dev/null |
12 |
+++ b/eclass/eqawarn.eclass |
13 |
@@ -0,0 +1,26 @@ |
14 |
+# Copyright 1999-2022 Gentoo Authors |
15 |
+# Distributed under the terms of the GNU General Public License v2 |
16 |
+ |
17 |
+# @ECLASS: eqawarn.eclass |
18 |
+# @MAINTAINER: |
19 |
+# base-system@g.o |
20 |
+# @SUPPORTED_EAPIS: 6 |
21 |
+# @BLURB: output a QA warning |
22 |
+ |
23 |
+case ${EAPI} in |
24 |
+ 6) ;; |
25 |
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; |
26 |
+esac |
27 |
+ |
28 |
+# @FUNCTION: eqawarn |
29 |
+# @USAGE: [message] |
30 |
+# @DESCRIPTION: |
31 |
+# Proxy to ewarn for package managers that don't provide eqawarn and |
32 |
+# use the PM implementation if available. Reuses PORTAGE_ELOG_CLASSES |
33 |
+# as set by the dev profile. |
34 |
+if ! declare -F eqawarn >/dev/null ; then |
35 |
+ eqawarn() { |
36 |
+ has qa ${PORTAGE_ELOG_CLASSES} && ewarn "$@" |
37 |
+ : |
38 |
+ } |
39 |
+fi |
40 |
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass |
41 |
index e7fae2c656c6..b1479d33049c 100644 |
42 |
--- a/eclass/eutils.eclass |
43 |
+++ b/eclass/eutils.eclass |
44 |
@@ -24,7 +24,7 @@ _EUTILS_ECLASS=1 |
45 |
|
46 |
# implicitly inherited (now split) eclasses |
47 |
case ${EAPI} in |
48 |
- 6) inherit desktop edos2unix epatch estack ltprune multilib \ |
49 |
+ 6) inherit desktop edos2unix epatch eqawarn estack ltprune multilib \ |
50 |
preserve-libs strip-linguas toolchain-funcs vcs-clean wrapper ;; |
51 |
7) inherit edos2unix strip-linguas wrapper ;; |
52 |
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; |
53 |
@@ -50,17 +50,4 @@ use_if_iuse() { |
54 |
die "use_if_iuse is banned" |
55 |
} |
56 |
|
57 |
-# @FUNCTION: eqawarn |
58 |
-# @USAGE: [message] |
59 |
-# @DESCRIPTION: |
60 |
-# Proxy to ewarn for package managers that don't provide eqawarn and use the PM |
61 |
-# implementation if available. Reuses PORTAGE_ELOG_CLASSES as set by the dev |
62 |
-# profile. |
63 |
-if [[ ${EAPI} == 6 ]] && ! declare -F eqawarn >/dev/null ; then |
64 |
- eqawarn() { |
65 |
- has qa ${PORTAGE_ELOG_CLASSES} && ewarn "$@" |
66 |
- : |
67 |
- } |
68 |
-fi |
69 |
- |
70 |
fi |
71 |
-- |
72 |
2.35.1 |