[oe-commits] Ross Burton : systemd.bbclass: use PACKAGESPLITFUNCS instead of populate_packages_prepend

git at git.openembedded.org git at git.openembedded.org
Tue Feb 12 16:38:01 UTC 2013


Module: openembedded-core.git
Branch: master-next
Commit: eed7294ba9aedf47af5c64ff11777015e59f48ef
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=eed7294ba9aedf47af5c64ff11777015e59f48ef

Author: Ross Burton <ross.burton at intel.com>
Date:   Mon Feb 11 16:01:20 2013 +0000

systemd.bbclass: use PACKAGESPLITFUNCS instead of populate_packages_prepend

This is cleaner and leads to more accurate profiles.

Signed-off-by: Ross Burton <ross.burton at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/systemd.bbclass |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass
index e0ea65c..8b55813 100644
--- a/meta/classes/systemd.bbclass
+++ b/meta/classes/systemd.bbclass
@@ -10,7 +10,7 @@ SYSTEMD_AUTO_ENABLE ??= "enable"
 # even if the systemd DISTRO_FEATURE isn't enabled.  As such don't make any
 # changes directly but check the DISTRO_FEATURES first.
 python __anonymous() {
-    if oe.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
+    if "systemd" in d.getVar("DISTRO_FEATURES", True).split():
         d.appendVar("DEPENDS", " systemd-systemctl-native")
         # Set a variable so that update-rcd.bbclass knows we're active and can
         # disable itself.
@@ -39,7 +39,10 @@ fi
 systemctl disable ${SYSTEMD_SERVICE}
 }
 
-def systemd_populate_packages(d):
+python systemd_populate_packages() {
+    if "systemd" not in d.getVar("DISTRO_FEATURES", True).split():
+        return
+
     def get_package_var(d, var, pkg):
         val = (d.getVar('%s_%s' % (var, pkg), True) or "").strip()
         if val == "":
@@ -150,9 +153,6 @@ def systemd_populate_packages(d):
                 systemd_generate_package_scripts(pkg)
                 systemd_add_rdepends(pkg)
         systemd_check_services()
-
-
-python populate_packages_prepend () {
-    if oe.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
-        systemd_populate_packages (d)
 }
+
+PACKAGESPLITFUNCS_prepend = "systemd_populate_packages "





More information about the Openembedded-commits mailing list