summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2022-07-23 21:19:38 +0200
committerUlrich Müller <ulm@gentoo.org>2022-07-24 19:49:42 +0200
commitc54b9fc0e02e07d4af019d81de611c865521b369 (patch)
tree6bb63adebea92233c806602e5ee0f40c2fb87c5f /eclass
parentnet-wireless/unifi: add 7.1.68 (diff)
downloadgentoo-c54b9fc0e02e07d4af019d81de611c865521b369.tar.gz
gentoo-c54b9fc0e02e07d4af019d81de611c865521b369.tar.bz2
gentoo-c54b9fc0e02e07d4af019d81de611c865521b369.zip
eqawarn.eclass: New eclass, split off from eutils
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/eqawarn.eclass26
-rw-r--r--eclass/eutils.eclass15
2 files changed, 27 insertions, 14 deletions
diff --git a/eclass/eqawarn.eclass b/eclass/eqawarn.eclass
new file mode 100644
index 000000000000..288976182fb3
--- /dev/null
+++ b/eclass/eqawarn.eclass
@@ -0,0 +1,26 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: eqawarn.eclass
+# @MAINTAINER:
+# base-system@gentoo.org
+# @SUPPORTED_EAPIS: 6
+# @BLURB: output a QA warning
+
+case ${EAPI} in
+ 6) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
+# @FUNCTION: eqawarn
+# @USAGE: [message]
+# @DESCRIPTION:
+# Proxy to ewarn for package managers that don't provide eqawarn and
+# use the PM implementation if available. Reuses PORTAGE_ELOG_CLASSES
+# as set by the dev profile.
+if ! declare -F eqawarn >/dev/null ; then
+ eqawarn() {
+ has qa ${PORTAGE_ELOG_CLASSES} && ewarn "$@"
+ :
+ }
+fi
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index e7fae2c656c6..b1479d33049c 100644
--- a/eclass/eutils.eclass
+++ b/eclass/eutils.eclass
@@ -24,7 +24,7 @@ _EUTILS_ECLASS=1
# implicitly inherited (now split) eclasses
case ${EAPI} in
- 6) inherit desktop edos2unix epatch estack ltprune multilib \
+ 6) inherit desktop edos2unix epatch eqawarn estack ltprune multilib \
preserve-libs strip-linguas toolchain-funcs vcs-clean wrapper ;;
7) inherit edos2unix strip-linguas wrapper ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
@@ -50,17 +50,4 @@ use_if_iuse() {
die "use_if_iuse is banned"
}
-# @FUNCTION: eqawarn
-# @USAGE: [message]
-# @DESCRIPTION:
-# Proxy to ewarn for package managers that don't provide eqawarn and use the PM
-# implementation if available. Reuses PORTAGE_ELOG_CLASSES as set by the dev
-# profile.
-if [[ ${EAPI} == 6 ]] && ! declare -F eqawarn >/dev/null ; then
- eqawarn() {
- has qa ${PORTAGE_ELOG_CLASSES} && ewarn "$@"
- :
- }
-fi
-
fi