]> code.ossystems Code Review - openembedded-core.git/commitdiff
opkg: fix systemd unit installation
authorRoss Burton <ross.burton@intel.com>
Fri, 20 Feb 2015 16:39:40 +0000 (16:39 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 21 Feb 2015 22:04:24 +0000 (22:04 +0000)
SYSTEMD_SERVICE doesn't need to be set conditionally, and units should be
installed if the systemd DISTRO_FEATURE is enabled, not if sysvinit isn't
enabled.

Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-devtools/opkg/opkg_0.2.4.bb

index 7b49d5efe62429a882a1506cfa15d32fbf8df221..4051b7221eb3b45c7e36339000ea279aa9ebfa99 100644 (file)
@@ -26,11 +26,7 @@ SRC_URI[sha256sum] = "0f40c7e457d81edf9aedc07c778f4697111ab163a38ef95999faece015
 
 inherit autotools pkgconfig systemd
 
-python () {
-    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
-        pn = d.getVar('PN', True)
-        d.setVar('SYSTEMD_SERVICE_%s' % (pn), 'opkg-configure.service')
-}
+SYSTEMD_SERVICE_${PN} = "opkg-configure.service"
 
 target_localstatedir := "${localstatedir}"
 OPKGLIBDIR = "${target_localstatedir}/lib"
@@ -64,7 +60,7 @@ do_install_append () {
        # We need to create the lock directory
        install -d ${D}${OPKGLIBDIR}/opkg
 
-       if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)};then
+       if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then
                install -d ${D}${systemd_unitdir}/system
                install -m 0644 ${WORKDIR}/opkg-configure.service ${D}${systemd_unitdir}/system/
                sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \