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 8ec0c5d..c0c21a1 100644 |
10 |
--- a/eclass/systemd.eclass |
11 |
+++ b/eclass/systemd.eclass |
12 |
@@ -313,6 +313,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 |
@@ -323,6 +326,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}, use --with-${1:-systemdsystemunitdir}=\"\$(systemd_get_systemunitdir)\" instead" |
27 |
+ |
28 |
debug-print-function ${FUNCNAME} "${@}" |
29 |
local optname=${1:-systemdsystemunitdir} |
30 |
|
31 |
@@ -331,10 +336,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}, use --with-systemdutildir=\"\$(systemd_get_utildir)\" instead" |
43 |
+ |
44 |
debug-print-function ${FUNCNAME} "${@}" |
45 |
|
46 |
echo --with-systemdutildir="$(systemd_get_utildir)" |
47 |
-- |
48 |
2.6.3 |