Patchwork [meta-oe,v2] 04/22] systemd.bbclass: automatically create packages set in SYSTEMD_PACKAGES

login
register
mail settings
Submitter Andreas Müller
Date Feb. 16, 2012, 2:02 a.m.
Message ID <1329357796-27398-5-git-send-email-schnitzeltony@googlemail.com>
Download mbox | patch
Permalink /patch/21297/
State Superseded, archived
Headers show

Comments

Andreas Müller - Feb. 16, 2012, 2:02 a.m.
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta-oe/classes/systemd.bbclass |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

Patch

diff --git a/meta-oe/classes/systemd.bbclass b/meta-oe/classes/systemd.bbclass
index 45f3e7f..0ea03ee 100644
--- a/meta-oe/classes/systemd.bbclass
+++ b/meta-oe/classes/systemd.bbclass
@@ -61,8 +61,17 @@  def systemd_after_parse(d):
 				if systemd_services == "":
 					raise bb.build.FuncFailed, "\n\n%s inherits systemd but doesn't set SYSTEMD_SERVICE / %s" % (bb_filename, service_pkg)
 
+	# prepend systemd-packages not already included
+	def systemd_create_package(pkg_systemd):
+		packages = d.getVar('PACKAGES', 1)
+		if not pkg_systemd in packages:
+			packages = "%s %s" % (pkg_systemd, packages)
+			d.setVar('PACKAGES', packages)
+
 
 	systemd_check_vars()
+	for pkg_systemd in d.getVar('SYSTEMD_PACKAGES', 1).split():
+		systemd_create_package(pkg_systemd)
 
 
 python __anonymous() {