public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH 6/8] systemd.eclass: Ban systemd_with_* in EAPI 6
Date: Mon, 30 Nov 2015 16:01:20 +0100	[thread overview]
Message-ID: <1448895682-19312-7-git-send-email-mgorny@gentoo.org> (raw)
In-Reply-To: <1448895682-19312-1-git-send-email-mgorny@gentoo.org>

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.
---
 eclass/systemd.eclass | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass
index 8ec0c5d..c0c21a1 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)"
-- 
2.6.3



  parent reply	other threads:[~2015-11-30 15:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-27 14:53 [gentoo-dev] [PATCHES] systemd.eclass: Clean up & EAPI 6 support Michał Górny
2015-11-27 14:53 ` [gentoo-dev] [PATCH 1/7] systemd.eclass: Introduce a common getter for systemd directories Michał Górny
2015-11-27 14:53 ` [gentoo-dev] [PATCH 2/7] systemd.eclass: Update the example for best practices Michał Górny
2015-11-27 14:53 ` [gentoo-dev] [PATCH 3/7] systemd.eclass: Remove long-deprecated systemd_to_myeconfargs Michał Górny
2015-11-27 14:53 ` [gentoo-dev] [PATCH 4/7] systemd.eclass: Add missing ||die on ntp file writes Michał Górny
2015-11-27 14:53 ` [gentoo-dev] [PATCH 5/7] systemd.eclass: Ban systemd_with_* in EAPI 6 Michał Górny
2015-11-27 14:53 ` [gentoo-dev] [PATCH 6/7] systemd.eclass: Allow systemd_update_catalog only during pkg_post* Michał Górny
2015-11-27 14:53 ` [gentoo-dev] [PATCH 7/7] systemd.eclass: Enable EAPI=6 Michał Górny
2015-11-30 15:01 ` [gentoo-dev] [v2] systemd.eclass cleanup & EAPI 6 support Michał Górny
2015-11-30 15:01   ` [gentoo-dev] [PATCH 1/8] systemd.eclass: Introduce a common getter for systemd directories Michał Górny
2015-11-30 15:01   ` [gentoo-dev] [PATCH 2/8] systemd.eclass: systemd_get_unitdir -> *systemunitdir for consistency Michał Górny
2015-11-30 15:01   ` [gentoo-dev] [PATCH 3/8] systemd.eclass: Update the example for best practices Michał Górny
2015-11-30 15:01   ` [gentoo-dev] [PATCH 4/8] systemd.eclass: Remove long-deprecated systemd_to_myeconfargs Michał Górny
2015-11-30 15:01   ` [gentoo-dev] [PATCH 5/8] systemd.eclass: Add missing ||die on ntp file writes Michał Górny
2015-11-30 15:01   ` Michał Górny [this message]
2015-11-30 15:01   ` [gentoo-dev] [PATCH 7/8] systemd.eclass: Allow systemd_update_catalog only during pkg_post* Michał Górny
2015-11-30 15:01   ` [gentoo-dev] [PATCH 8/8] systemd.eclass: Enable EAPI=6 Michał Górny
2015-12-01 22:08   ` [gentoo-dev] [v2] systemd.eclass cleanup & EAPI 6 support Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1448895682-19312-7-git-send-email-mgorny@gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox