From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH V2] systemd.bbclass: Dont use libdir and base_libdir for units
Date: Tue, 12 Feb 2013 23:46:10 -0800 [thread overview]
Message-ID: <1360741570-11148-2-git-send-email-raj.khem@gmail.com> (raw)
In-Reply-To: <1360741570-11148-1-git-send-email-raj.khem@gmail.com>
systemd always uses /lib and /usr/lib to store unit files
so using libdir and base_libdir is incorrect. It will work
where libdir is usr/lib and base_libdir is /lib but wont work
when say its /lib64
Add a check to make sure that SYSTEMD_PACKAGES are part of PACKAGES
too, otherwise error out
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/classes/systemd.bbclass | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass
index 8b55813..269e3f9 100644
--- a/meta/classes/systemd.bbclass
+++ b/meta/classes/systemd.bbclass
@@ -49,6 +49,12 @@ python systemd_populate_packages() {
val = (d.getVar(var, True) or "").strip()
return val
+ # Check if systemd-packages already included in PACKAGES
+ def systemd_check_package(pkg_systemd):
+ packages = d.getVar('PACKAGES', True)
+ if not pkg_systemd in packages:
+ bb.error('%s does not appear in package list, please add it', " " + pkg_systemd)
+
# Add a runtime dependency on systemd to pkg
def systemd_add_rdepends(pkg):
@@ -118,11 +124,9 @@ python systemd_populate_packages() {
# Check service-files and call systemd_add_files_and_parse for each entry
def systemd_check_services():
- base_libdir = d.getVar('base_libdir', True)
searchpaths = [oe.path.join(d.getVar("sysconfdir", True), "systemd", "system"),]
- searchpaths.append(oe.path.join(d.getVar("base_libdir", True), "systemd", "system"))
- searchpaths.append(oe.path.join(d.getVar("libdir", True), "systemd", "system"))
- searchpaths.append(oe.path.join(d.getVar("libdir", True), "systemd", "user"))
+ searchpaths.append(oe.path.join(d.getVar("nonarch_base_libdir", True), "systemd", "system"))
+ searchpaths.append(oe.path.join(d.getVar("exec_prefix", True), d.getVar("nonarch_base_libdir", True), "systemd", "system"))
systemd_packages = d.getVar('SYSTEMD_PACKAGES', True)
has_exactly_one_service = len(systemd_packages.split()) == 1
if has_exactly_one_service:
@@ -149,6 +153,7 @@ python systemd_populate_packages() {
# Run all modifications once when creating package
if os.path.exists(d.getVar("D", True)):
for pkg in d.getVar('SYSTEMD_PACKAGES', True).split():
+ systemd_check_package(pkg)
if d.getVar('SYSTEMD_SERVICE_' + pkg, True):
systemd_generate_package_scripts(pkg)
systemd_add_rdepends(pkg)
--
1.7.9.5
next prev parent reply other threads:[~2013-02-13 8:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-13 7:46 [PATCH] qemu: Upgrade to 1.3.1 Khem Raj
2013-02-13 7:46 ` Khem Raj [this message]
2013-02-13 16:53 ` [PATCH V2] systemd.bbclass: Dont use libdir and base_libdir for units Burton, Ross
2013-02-13 18:44 ` [PATCH] qemu: Upgrade to 1.3.1 Saul Wold
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=1360741570-11148-2-git-send-email-raj.khem@gmail.com \
--to=raj.khem@gmail.com \
--cc=openembedded-core@lists.openembedded.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