Patchwork [meta-oe,1/1] systemd.bbclass: fix regression caused by c9f5703aded

login
register
mail settings
Submitter Otavio Salvador
Date Feb. 25, 2012, 2:31 a.m.
Message ID <a636b703aa1c86d0a873d14c23915f96234e44c4.1330137031.git.otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/22033/
State Accepted
Commit 504f2e084cfd14778f223c807ab5250becd32a7a
Headers show

Comments

Otavio Salvador - Feb. 25, 2012, 2:31 a.m.
The parsing condition was broken causing the packages not being
expanded to include <PN>-systemd packages automatically.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta-oe/classes/systemd.bbclass |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

Patch

diff --git a/meta-oe/classes/systemd.bbclass b/meta-oe/classes/systemd.bbclass
index 0329b90..a8c77c8 100644
--- a/meta-oe/classes/systemd.bbclass
+++ b/meta-oe/classes/systemd.bbclass
@@ -28,6 +28,9 @@  systemctl disable ${SYSTEMD_SERVICE}
 
 def systemd_after_parse(d):
 	def systemd_check_vars():
+		if d.getVar('BB_WORKERCONTEXT', True) is not None:
+			return
+
 		bb_filename = d.getVar('FILE')
 		packages = d.getVar('PACKAGES', 1)
 
@@ -66,11 +69,9 @@  def systemd_after_parse(d):
 
 
 	bpn = d.getVar('BPN', 1)
-	# not for native / only at parse time
-	if d.getVar('BB_WORKERCONTEXT', True) is None and \
-	bpn + "-native" != d.getVar('PN', 1) and \
-	bpn + "-cross" != d.getVar('PN', 1) and \
-	bpn + "-nativesdk" != d.getVar('PN', 1):
+	if bpn + "-native" != d.getVar('PN', 1) and \
+		    bpn + "-cross" != d.getVar('PN', 1) and \
+		    bpn + "-nativesdk" != d.getVar('PN', 1):
 		systemd_check_vars()
 		for pkg_systemd in d.getVar('SYSTEMD_PACKAGES', 1).split():
 			systemd_create_package(pkg_systemd)