[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    [gentoo-dev] [PATCH systemd.eclass 1/3] Add systemd_newtmpfilesd().
From:       Michał Górny <mgorny () gentoo ! org>
Date:       2012-08-20 22:24:09
Message-ID: 1345501451-5596-1-git-send-email-mgorny () gentoo ! org
[Download RAW message or body]

In pair with systemd_dotmpfilesd(), they will be the canonical functions
to install tmpfiles.d files.

I've talked with Sergei and we agreed to not move the functions around
but leave systemd.eclass as the canonical source of locations for
systemd-related files. The eclass will not introduce any dependencies or
other side effects.

Uses inline ( insinto; newins ) because of Diego's disapproval of
newinto function into eutils. Feel free to fix it as soon as we get such
a thing into EAPI and remove all EAPIs up to 4.
---
 gx86/eclass/systemd.eclass | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/gx86/eclass/systemd.eclass b/gx86/eclass/systemd.eclass
index 1ddc9b0..4066e31 100644
--- a/gx86/eclass/systemd.eclass
+++ b/gx86/eclass/systemd.eclass
@@ -95,6 +95,20 @@ systemd_dotmpfilesd() {
 	)
 }
 
+# @FUNCTION: systemd_newtmpfilesd
+# @USAGE: oldname newname.conf
+# @DESCRIPTION:
+# Install systemd tmpfiles.d file under a new name. Uses newins, thus it
+# is fatal in EAPI 4 and non-fatal in earlier EAPIs.
+systemd_newtmpfilesd() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	(
+		insinto /usr/lib/tmpfiles.d/
+		newins "${@}"
+	)
+}
+
 # @FUNCTION: systemd_enable_service
 # @USAGE: target service
 # @DESCRIPTION:
-- 
1.7.11.1


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic