summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2012-10-30 21:29:32 +0000
committerMichał Górny <mgorny@gentoo.org>2012-10-30 21:29:32 +0000
commit7c8d7c5c2f2df6bb2d9a3c84e66bd51521182c4a (patch)
treee854c34e137ff84bf7618cdc0cf6cea2aa4485a3 /eclass
parentRemove empty depend to fix bug #436310 (diff)
downloadgentoo-2-7c8d7c5c2f2df6bb2d9a3c84e66bd51521182c4a.tar.gz
gentoo-2-7c8d7c5c2f2df6bb2d9a3c84e66bd51521182c4a.tar.bz2
gentoo-2-7c8d7c5c2f2df6bb2d9a3c84e66bd51521182c4a.zip
Introduce systemd_get_utildir() wrt bug #440320.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/systemd.eclass14
2 files changed, 17 insertions, 2 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 0cd68e6ade45..4224e0f9f0b9 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.486 2012/10/30 20:24:09 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.487 2012/10/30 21:29:32 mgorny Exp $
+
+ 30 Oct 2012; Michał Górny <mgorny@gentoo.org> systemd.eclass:
+ Introduce systemd_get_utildir() wrt bug #440320.
30 Oct 2012; Michał Górny <mgorny@gentoo.org> systemd.eclass:
Replace "echo -n" with "echo", bash removes trailing newline in subshells
diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass
index d5da09cddbf0..2c4a2567d5de 100644
--- a/eclass/systemd.eclass
+++ b/eclass/systemd.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v 1.16 2012/10/30 20:24:09 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v 1.17 2012/10/30 21:29:32 mgorny Exp $
# @ECLASS: systemd.eclass
# @MAINTAINER:
@@ -49,6 +49,18 @@ systemd_get_unitdir() {
echo "${EPREFIX}$(_systemd_get_unitdir)"
}
+# @FUNCTION: systemd_get_utildir
+# @DESCRIPTION:
+# Output the path for the systemd utility directory (not including
+# ${D}). This function always succeeds, even if systemd is not
+# installed.
+systemd_get_utildir() {
+ has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
+ debug-print-function ${FUNCNAME} "${@}"
+
+ echo "${EPREFIX}/usr/lib/systemd"
+}
+
# @FUNCTION: systemd_dounit
# @USAGE: unit1 [...]
# @DESCRIPTION: