systemd: Fix build when base_libdir is not /lib

we were carrying a wrong patch to fix rootlibdir
to adapt systemd to OE's notion of base_libdir
but thats not right and the units dont get initialised
properly when we have base_libdir which is not /lib

This patch fixes the use of base_libdir where
it should have been catering to notions of systemd/udev
for putting unit files and init scripts in /lib
and not in base_libdir

It also ignores the lib32-* packages so that systemd
build works for multilib enabled systems.

Adapt to nativesdk renaming

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj
2012-10-09 06:44:06 +00:00
parent 4202d1a6e6
commit 69b0e85b41
2 changed files with 45 additions and 39 deletions
+4 -3
View File
@@ -70,7 +70,8 @@ def systemd_after_parse(d):
bpn = d.getVar('BPN', 1)
if bpn + "-native" != d.getVar('PN', 1) and \
bpn + "-cross" != d.getVar('PN', 1) and \
bpn + "-nativesdk" != d.getVar('PN', 1):
not d.getVar('MLPREFIX', 1) and \
"nativesdk-" + bpn != d.getVar('PN', 1):
systemd_check_vars()
for pkg_systemd in d.getVar('SYSTEMD_PACKAGES', 1).split():
systemd_create_package(pkg_systemd)
@@ -158,8 +159,8 @@ python populate_packages_prepend () {
def systemd_check_services():
base_libdir = d.getVar('base_libdir', 1)
searchpaths = '/etc/systemd/system/' + ' '
searchpaths += d.getVar('base_libdir', 1) + '/systemd/system/' + ' '
searchpaths += d.getVar('libdir', 1) + '/systemd/system/' + ' '
searchpaths += '/lib/systemd/system/' + ' '
searchpaths += '/usr/lib/systemd/system/' + ' '
systemd_packages = d.getVar('SYSTEMD_PACKAGES', 1)
has_exactly_one_service = len(systemd_packages.split()) == 1
if has_exactly_one_service: