summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 8ee22daa383c..a9a3bb5f4e10 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.584 2012/12/31 13:08:12 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.585 2012/12/31 13:09:09 mgorny Exp $
+
+ 31 Dec 2012; Michał Górny <mgorny@gentoo.org> systemd.eclass:
+ Add function to get user unit directory, as requested in bug #449304.
31 Dec 2012; Michał Górny <mgorny@gentoo.org> systemd.eclass:
Add function to update systemd journal catalog database.
diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass
index 01ac05015d29..60aae0f59776 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.20 2012/12/31 13:08:12 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v 1.21 2012/12/31 13:09:09 mgorny Exp $
# @ECLASS: systemd.eclass
# @MAINTAINER:
@@ -49,6 +49,18 @@ systemd_get_unitdir() {
echo "${EPREFIX}$(_systemd_get_unitdir)"
}
+# @FUNCTION: systemd_get_userunitdir
+# @DESCRIPTION:
+# Output the path for the systemd user unit directory (not including
+# ${D}). This function always succeeds, even if systemd is not
+# installed.
+systemd_get_userunitdir() {
+ has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
+ debug-print-function ${FUNCNAME} "${@}"
+
+ echo "${EPREFIX}/usr/lib/systemd/user"
+}
+
# @FUNCTION: systemd_get_utildir
# @DESCRIPTION:
# Output the path for the systemd utility directory (not including