1 |
commit: f6ffff4a5b235a99225ae4e41ecceeae462aa567 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Nov 27 14:40:21 2015 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 1 22:07:17 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6ffff4a |
7 |
|
8 |
systemd.eclass: Ban systemd_with_* in EAPI 6 |
9 |
|
10 |
Deprecate systemd_with_* and ban it in EAPI 6. Those are only |
11 |
convenience wrappers for systemd_get_* which barely save typing and are |
12 |
much less readable than explicit --with-* parameters. |
13 |
|
14 |
eclass/systemd.eclass | 10 ++++++++++ |
15 |
1 file changed, 10 insertions(+) |
16 |
|
17 |
diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass |
18 |
index 8ec0c5d..c0c21a1 100644 |
19 |
--- a/eclass/systemd.eclass |
20 |
+++ b/eclass/systemd.eclass |
21 |
@@ -313,6 +313,9 @@ systemd_enable_ntpunit() { |
22 |
# @FUNCTION: systemd_with_unitdir |
23 |
# @USAGE: [<configure-option-name>] |
24 |
# @DESCRIPTION: |
25 |
+# Note: deprecated and banned in EAPI 6. Please use full --with-...= |
26 |
+# parameter for improved ebuild readability. |
27 |
+# |
28 |
# Output '--with-systemdsystemunitdir' as expected by systemd-aware configure |
29 |
# scripts. This function always succeeds. Its output may be quoted in order |
30 |
# to preserve whitespace in paths. systemd_to_myeconfargs() is preferred over |
31 |
@@ -323,6 +326,8 @@ systemd_enable_ntpunit() { |
32 |
# argument to this function (`$(systemd_with_unitdir systemdunitdir)'). Please |
33 |
# remember to report a bug upstream as well. |
34 |
systemd_with_unitdir() { |
35 |
+ [[ ${EAPI:-0} != [012345] ]] && die "${FUNCNAME} is banned in EAPI ${EAPI}, use --with-${1:-systemdsystemunitdir}=\"\$(systemd_get_systemunitdir)\" instead" |
36 |
+ |
37 |
debug-print-function ${FUNCNAME} "${@}" |
38 |
local optname=${1:-systemdsystemunitdir} |
39 |
|
40 |
@@ -331,10 +336,15 @@ systemd_with_unitdir() { |
41 |
|
42 |
# @FUNCTION: systemd_with_utildir |
43 |
# @DESCRIPTION: |
44 |
+# Note: deprecated and banned in EAPI 6. Please use full --with-...= |
45 |
+# parameter for improved ebuild readability. |
46 |
+# |
47 |
# Output '--with-systemdsystemutildir' as used by some packages to install |
48 |
# systemd helpers. This function always succeeds. Its output may be quoted |
49 |
# in order to preserve whitespace in paths. |
50 |
systemd_with_utildir() { |
51 |
+ [[ ${EAPI:-0} != [012345] ]] && die "${FUNCNAME} is banned in EAPI ${EAPI}, use --with-systemdutildir=\"\$(systemd_get_utildir)\" instead" |
52 |
+ |
53 |
debug-print-function ${FUNCNAME} "${@}" |
54 |
|
55 |
echo --with-systemdutildir="$(systemd_get_utildir)" |