Skip to contentSkip to conversation

sysvinit: Only enable recipe in builds where its applicable

PATCH New Richard Purdie 1 participant 1 message Jun 8, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sysvinit: Only enable recipe in builds where its applicable

Similarly to systemd, only enable the recipe in builds where sysvinit is configured in DISTRO_FEATURES. This allows the new cleanup mechanism to handle it correctly in existing builds.

meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb +5 -0
index 2c7e3ce..6709a9b 100644
@@ -100,3 +100,8 @@ do_install () {
 	chown root.shutdown ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
 	chmod o-x,u+s ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
 }
+
+python () {
+    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+        raise bb.parse.SkipPackage("'sysvinit' not in DISTRO_FEATURES")
+}