From: Michał Górny Date: Fri, 27 Nov 2015 14:40:21 +0000 (+0100) Subject: systemd.eclass: Ban systemd_with_* in EAPI 6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f6ffff4a5b235a99225ae4e41ecceeae462aa567;p=gentoo.git systemd.eclass: Ban systemd_with_* in EAPI 6 Deprecate systemd_with_* and ban it in EAPI 6. Those are only convenience wrappers for systemd_get_* which barely save typing and are much less readable than explicit --with-* parameters. --- diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass index 8ec0c5d81384..c0c21a1426f6 100644 --- a/eclass/systemd.eclass +++ b/eclass/systemd.eclass @@ -313,6 +313,9 @@ systemd_enable_ntpunit() { # @FUNCTION: systemd_with_unitdir # @USAGE: [] # @DESCRIPTION: +# Note: deprecated and banned in EAPI 6. Please use full --with-...= +# parameter for improved ebuild readability. +# # Output '--with-systemdsystemunitdir' as expected by systemd-aware configure # scripts. This function always succeeds. Its output may be quoted in order # to preserve whitespace in paths. systemd_to_myeconfargs() is preferred over @@ -323,6 +326,8 @@ systemd_enable_ntpunit() { # argument to this function (`$(systemd_with_unitdir systemdunitdir)'). Please # remember to report a bug upstream as well. systemd_with_unitdir() { + [[ ${EAPI:-0} != [012345] ]] && die "${FUNCNAME} is banned in EAPI ${EAPI}, use --with-${1:-systemdsystemunitdir}=\"\$(systemd_get_systemunitdir)\" instead" + debug-print-function ${FUNCNAME} "${@}" local optname=${1:-systemdsystemunitdir} @@ -331,10 +336,15 @@ systemd_with_unitdir() { # @FUNCTION: systemd_with_utildir # @DESCRIPTION: +# Note: deprecated and banned in EAPI 6. Please use full --with-...= +# parameter for improved ebuild readability. +# # Output '--with-systemdsystemutildir' as used by some packages to install # systemd helpers. This function always succeeds. Its output may be quoted # in order to preserve whitespace in paths. systemd_with_utildir() { + [[ ${EAPI:-0} != [012345] ]] && die "${FUNCNAME} is banned in EAPI ${EAPI}, use --with-systemdutildir=\"\$(systemd_get_utildir)\" instead" + debug-print-function ${FUNCNAME} "${@}" echo --with-systemdutildir="$(systemd_get_utildir)"