[OE-core] [PATCH v2 29/33] dpkg: always install dpkg-configure.service

Andreas Oberritter obi at opendreambox.org
Thu Dec 8 21:47:53 UTC 2016


systemd.bbclass handles everything based on DISTRO_FEATURES.

Signed-off-by: Andreas Oberritter <obi at opendreambox.org>
---
 meta/recipes-devtools/dpkg/dpkg.inc | 22 ++++++++--------------
 1 file changed, 8 insertions(+), 14 deletions(-)

diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index 09c962e..40cfc45 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -9,11 +9,7 @@ UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/dpkg/"
 
 inherit autotools gettext perlnative 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), 'dpkg-configure.service')
-}
+SYSTEMD_SERVICE_${PN} = "dpkg-configure.service"
 
 export PERL = "${bindir}/perl"
 PERL_class-native = "${STAGING_BINDIR_NATIVE}/perl-native/perl"
@@ -49,15 +45,13 @@ do_install_append_class-native() {
 }
 
 do_install_append () {
-	if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)};then
-		install -d ${D}${systemd_unitdir}/system
-		install -m 0644 ${WORKDIR}/dpkg-configure.service ${D}${systemd_unitdir}/system/
-		sed -i -e 's, at BASE_BINDIR@,${base_bindir},g' \
-			-e 's, at SYSCONFDIR@,${sysconfdir},g' \
-			-e 's, at BINDIR@,${bindir},g' \
-			-e 's, at SYSTEMD_UNITDIR@,${systemd_unitdir},g' \
-			${D}${systemd_unitdir}/system/dpkg-configure.service
-	fi
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/dpkg-configure.service ${D}${systemd_unitdir}/system
+    sed -e 's, at BASE_BINDIR@,${base_bindir},g' \
+        -e 's, at SYSCONFDIR@,${sysconfdir},g' \
+        -e 's, at BINDIR@,${bindir},g' \
+        -e 's, at SYSTEMD_UNITDIR@,${systemd_unitdir},g' \
+        -i ${D}${systemd_unitdir}/system/dpkg-configure.service
 }
 
 PACKAGES =+ "dpkg-perl dselect libdpkg-perl start-stop-daemon update-alternatives-dpkg"
-- 
2.7.4




More information about the Openembedded-core mailing list