* [gentoo-dev] [PATCH] eutils.eclass: Disable eqawarn in EAPI 7.
@ 2018-08-10 16:36 Ulrich Müller
0 siblings, 0 replies; only message in thread
From: Ulrich Müller @ 2018-08-10 16:36 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1384 bytes --]
The eqawarn command is part of EAPI 7, therefore the eclass should not
override it. Also we cannot rely on its being a shell function.
---
eclass/eutils.eclass | 32 +++++++++++++++++++-------------
1 file changed, 19 insertions(+), 13 deletions(-)
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index 9b4767e1874a..e5d0ebeebb06 100644
--- a/eclass/eutils.eclass
+++ b/eclass/eutils.eclass
@@ -25,19 +25,6 @@ case ${EAPI:-0} in
;;
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
-
# @FUNCTION: emktemp
# @USAGE: [temp dir]
# @DESCRIPTION:
@@ -415,4 +402,23 @@ in_iuse() {
;;
esac
+case ${EAPI:-0} in
+0|1|2|3|4|5|6)
+
+# @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
+
+;;
+esac
+
fi
--
2.18.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-08-10 18:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-10 16:36 [gentoo-dev] [PATCH] eutils.eclass: Disable eqawarn in EAPI 7 Ulrich Müller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox