Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH systemd.eclass 1/3] Add systemd_newtmpfilesd().
Date: Mon, 20 Aug 2012 22:26:05
Message-Id: 1345501451-5596-1-git-send-email-mgorny@gentoo.org
1 In pair with systemd_dotmpfilesd(), they will be the canonical functions
2 to install tmpfiles.d files.
3
4 I've talked with Sergei and we agreed to not move the functions around
5 but leave systemd.eclass as the canonical source of locations for
6 systemd-related files. The eclass will not introduce any dependencies or
7 other side effects.
8
9 Uses inline ( insinto; newins ) because of Diego's disapproval of
10 newinto function into eutils. Feel free to fix it as soon as we get such
11 a thing into EAPI and remove all EAPIs up to 4.
12 ---
13 gx86/eclass/systemd.eclass | 14 ++++++++++++++
14 1 file changed, 14 insertions(+)
15
16 diff --git a/gx86/eclass/systemd.eclass b/gx86/eclass/systemd.eclass
17 index 1ddc9b0..4066e31 100644
18 --- a/gx86/eclass/systemd.eclass
19 +++ b/gx86/eclass/systemd.eclass
20 @@ -95,6 +95,20 @@ systemd_dotmpfilesd() {
21 )
22 }
23
24 +# @FUNCTION: systemd_newtmpfilesd
25 +# @USAGE: oldname newname.conf
26 +# @DESCRIPTION:
27 +# Install systemd tmpfiles.d file under a new name. Uses newins, thus it
28 +# is fatal in EAPI 4 and non-fatal in earlier EAPIs.
29 +systemd_newtmpfilesd() {
30 + debug-print-function ${FUNCNAME} "${@}"
31 +
32 + (
33 + insinto /usr/lib/tmpfiles.d/
34 + newins "${@}"
35 + )
36 +}
37 +
38 # @FUNCTION: systemd_enable_service
39 # @USAGE: target service
40 # @DESCRIPTION:
41 --
42 1.7.11.1

Replies