Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 5/7] systemd.eclass: Ban systemd_with_* in EAPI 6
Date: Fri, 27 Nov 2015 14:56:29
Message-Id: 1448636008-13184-6-git-send-email-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCHES] systemd.eclass: Clean up & EAPI 6 support by "Michał Górny"
1 Deprecate systemd_with_* and ban it in EAPI 6. Those are only
2 convenience wrappers for systemd_get_* which barely save typing and are
3 much less readable than explicit --with-* parameters.
4 ---
5 eclass/systemd.eclass | 10 ++++++++++
6 1 file changed, 10 insertions(+)
7
8 diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass
9 index 7e5b609..a9ec26d 100644
10 --- a/eclass/systemd.eclass
11 +++ b/eclass/systemd.eclass
12 @@ -304,6 +304,9 @@ systemd_enable_ntpunit() {
13 # @FUNCTION: systemd_with_unitdir
14 # @USAGE: [<configure-option-name>]
15 # @DESCRIPTION:
16 +# Note: deprecated and banned in EAPI 6. Please use full --with-...=
17 +# parameter for improved ebuild readability.
18 +#
19 # Output '--with-systemdsystemunitdir' as expected by systemd-aware configure
20 # scripts. This function always succeeds. Its output may be quoted in order
21 # to preserve whitespace in paths. systemd_to_myeconfargs() is preferred over
22 @@ -314,6 +317,8 @@ systemd_enable_ntpunit() {
23 # argument to this function (`$(systemd_with_unitdir systemdunitdir)'). Please
24 # remember to report a bug upstream as well.
25 systemd_with_unitdir() {
26 + [[ ${EAPI:-0} != [012345] ]] && die "${FUNCNAME} is banned in EAPI ${EAPI}"
27 +
28 debug-print-function ${FUNCNAME} "${@}"
29 local optname=${1:-systemdsystemunitdir}
30
31 @@ -322,10 +327,15 @@ systemd_with_unitdir() {
32
33 # @FUNCTION: systemd_with_utildir
34 # @DESCRIPTION:
35 +# Note: deprecated and banned in EAPI 6. Please use full --with-...=
36 +# parameter for improved ebuild readability.
37 +#
38 # Output '--with-systemdsystemutildir' as used by some packages to install
39 # systemd helpers. This function always succeeds. Its output may be quoted
40 # in order to preserve whitespace in paths.
41 systemd_with_utildir() {
42 + [[ ${EAPI:-0} != [012345] ]] && die "${FUNCNAME} is banned in EAPI ${EAPI}"
43 +
44 debug-print-function ${FUNCNAME} "${@}"
45
46 echo --with-systemdutildir="$(systemd_get_utildir)"
47 --
48 2.6.3