From: Ross Burton <ross.burton@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] systemd.bbclass: use PACKAGESPLITFUNCS instead of populate_packages_prepend
Date: Mon, 11 Feb 2013 16:01:20 +0000 [thread overview]
Message-ID: <1360598480-20674-1-git-send-email-ross.burton@intel.com> (raw)
This is cleaner and leads to more accurate profiles.
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
meta/classes/systemd.bbclass | 14 +++++++-------
1 file 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 "
--
1.7.10.4
reply other threads:[~2013-02-11 16:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1360598480-20674-1-git-send-email-ross.burton@intel.com \
--to=ross.burton@intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox