From: "Michal Gorny (mgorny)" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in eclass: systemd.eclass
Date: Sat, 17 Sep 2011 13:48:22 +0000 (UTC) [thread overview]
Message-ID: <20110917134822.016F32004C@flycatcher.gentoo.org> (raw)
mgorny 11/09/17 13:48:21
Modified: systemd.eclass
Log:
Clean up, fix and simplify prefix support.
Revision Changes Path
1.9 eclass/systemd.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/systemd.eclass?rev=1.9&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/systemd.eclass?rev=1.9&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/systemd.eclass?r1=1.8&r2=1.9
Index: systemd.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- systemd.eclass 29 Aug 2011 01:28:10 -0000 1.8
+++ systemd.eclass 17 Sep 2011 13:48:21 -0000 1.9
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v 1.8 2011/08/29 01:28:10 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v 1.9 2011/09/17 13:48:21 mgorny Exp $
# @ECLASS: systemd.eclass
# @MAINTAINER:
@@ -30,6 +30,14 @@
*) die "${ECLASS}.eclass API in EAPI ${EAPI} not yet established."
esac
+# @FUNCTION: _systemd_get_unitdir
+# @INTERNAL
+# @DESCRIPTION:
+# Get unprefixed unitdir.
+_systemd_get_unitdir() {
+ echo -n /lib/systemd/system
+}
+
# @FUNCTION: systemd_get_unitdir
# @DESCRIPTION:
# Output the path for the systemd unit directory (not including ${D}).
@@ -38,7 +46,7 @@
has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
debug-print-function ${FUNCNAME} "${@}"
- echo -n "${EPREFIX}"/lib/systemd/system
+ echo -n "${EPREFIX}$(_systemd_get_unitdir)"
}
# @FUNCTION: systemd_dounit
@@ -47,12 +55,10 @@
# Install systemd unit(s). Uses doins, thus it is fatal in EAPI 4
# and non-fatal in earlier EAPIs.
systemd_dounit() {
- has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
debug-print-function ${FUNCNAME} "${@}"
(
- local ud=$(systemd_get_unitdir)
- insinto "${ud#${EPREFIX}}"
+ insinto "$(_systemd_get_unitdir)"
doins "${@}"
)
}
@@ -66,7 +72,7 @@
debug-print-function ${FUNCNAME} "${@}"
(
- insinto "$(systemd_get_unitdir)"
+ insinto "$(_systemd_get_unitdir)"
newins "${@}"
)
}
@@ -98,7 +104,7 @@
local target=${1}
local service=${2}
- local ud=$(systemd_get_unitdir)
+ local ud=$(_systemd_get_unitdir)
dodir "${ud}"/"${target}".wants && \
dosym ../"${service}" "${ud}"/"${target}".wants
next reply other threads:[~2011-09-17 13:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-17 13:48 Michal Gorny (mgorny) [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-04-13 22:36 [gentoo-commits] gentoo-x86 commit in eclass: systemd.eclass Michal Gorny (mgorny)
2011-07-28 13:47 Zac Medico (zmedico)
2011-06-24 13:13 Jeremy Olexa (darkside)
2011-06-19 16:05 Michal Gorny (mgorny)
2011-06-16 16:39 Michal Gorny (mgorny)
2011-06-11 6:06 Michal Gorny (mgorny)
2011-05-04 16:02 Michal Gorny (mgorny)
2011-05-04 10:53 Michal Gorny (mgorny)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110917134822.016F32004C@flycatcher.gentoo.org \
--to=mgorny@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox