Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sat, 09 Dec 2017 18:22:31
Message-Id: 1512843740.d95c9b270ed98a364ccc5a722744e497874f33f1.floppym@gentoo
1 commit: d95c9b270ed98a364ccc5a722744e497874f33f1
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 30 20:42:22 2017 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 9 18:22:20 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d95c9b27
7
8 systemd.eclass: add systemd_get_systemgeneratordir
9
10 This is needed for sys-process/systemd-cron.
11
12 eclass/systemd.eclass | 20 ++++++++++++++++++++
13 1 file changed, 20 insertions(+)
14
15 diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass
16 index 63ff5609589..cc3591b3301 100644
17 --- a/eclass/systemd.eclass
18 +++ b/eclass/systemd.eclass
19 @@ -121,6 +121,26 @@ systemd_get_utildir() {
20 echo "${EPREFIX}$(_systemd_get_utildir)"
21 }
22
23 +# @FUNCTION: _systemd_get_systemgeneratordir
24 +# @INTERNAL
25 +# @DESCRIPTION:
26 +# Get unprefixed systemgeneratordir.
27 +_systemd_get_systemgeneratordir() {
28 + _systemd_get_dir systemdsystemgeneratordir /usr/lib/systemd/system-generators
29 +}
30 +
31 +# @FUNCTION: systemd_get_systemgeneratordir
32 +# @DESCRIPTION:
33 +# Output the path for the systemd system generator directory (not including
34 +# ${D}). This function always succeeds, even if systemd is not
35 +# installed.
36 +systemd_get_systemgeneratordir() {
37 + has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
38 + debug-print-function ${FUNCNAME} "${@}"
39 +
40 + echo "${EPREFIX}$(_systemd_get_systemgeneratordir)"
41 +}
42 +
43 # @FUNCTION: systemd_dounit
44 # @USAGE: <unit>...
45 # @DESCRIPTION: