mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-30 18:12:08 +02:00
eclass/eqawarn: Add from Gentoo
It's from Gentoo commit c54b9fc0e02e07d4af019d81de611c865521b369.
This commit is contained in:
parent
c660c19d29
commit
dfb818cb2d
26
sdk_container/src/third_party/portage-stable/eclass/eqawarn.eclass
vendored
Normal file
26
sdk_container/src/third_party/portage-stable/eclass/eqawarn.eclass
vendored
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user