summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2015-11-27 15:40:21 +0100
committerMichał Górny <mgorny@gentoo.org>2015-12-01 23:07:17 +0100
commitf6ffff4a5b235a99225ae4e41ecceeae462aa567 (patch)
tree26f6de3eb02d2ab8cf4196600e0ab73e063411da /eclass
parentsystemd.eclass: Add missing ||die on ntp file writes (diff)
downloadgentoo-f6ffff4a5b235a99225ae4e41ecceeae462aa567.tar.gz
gentoo-f6ffff4a5b235a99225ae4e41ecceeae462aa567.tar.bz2
gentoo-f6ffff4a5b235a99225ae4e41ecceeae462aa567.zip
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.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/systemd.eclass10
1 files changed, 10 insertions, 0 deletions
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: [<configure-option-name>]
# @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)"