From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 8A0C21384B4 for ; Mon, 30 Nov 2015 15:04:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3B22721C0D5; Mon, 30 Nov 2015 15:01:37 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5EE7321C0D1 for ; Mon, 30 Nov 2015 15:01:36 +0000 (UTC) Received: from localhost.localdomain (d202-251.icpnet.pl [109.173.202.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id E0F7C340676; Mon, 30 Nov 2015 15:01:34 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH 6/8] systemd.eclass: Ban systemd_with_* in EAPI 6 Date: Mon, 30 Nov 2015 16:01:20 +0100 Message-Id: <1448895682-19312-7-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1448895682-19312-1-git-send-email-mgorny@gentoo.org> References: <1448636008-13184-1-git-send-email-mgorny@gentoo.org> <1448895682-19312-1-git-send-email-mgorny@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: f84362d7-c796-44fb-a997-73756b1948bc X-Archives-Hash: 677d1a8b1795dbec9b6f229c35151a3d 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: [] # @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