Patchwork [meta-oe,V3,07/23] systemd.bbclass: run code in populate_packages_prepend only if ${D} exists

login
register
mail settings
Submitter Andreas Müller
Date Feb. 23, 2012, 12:10 p.m.
Message ID <1329999054-23112-8-git-send-email-schnitzeltony@googlemail.com>
Download mbox | patch
Permalink /patch/21679/
State Accepted
Commit 916b26ef7d8c3779616763ceca144380bd6c058c
Headers show

Comments

Andreas Müller - Feb. 23, 2012, 12:10 p.m.
All further manipulations need to be performed only once. This modication
avoids unwanted behaviour when inheriting rm_work.bbclass [1]

[1] http://lists.linuxtogo.org/pipermail/openembedded-devel/2012-February/038067.html

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 meta-oe/classes/systemd.bbclass |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

Patch

diff --git a/meta-oe/classes/systemd.bbclass b/meta-oe/classes/systemd.bbclass
index b2d4191..e13f09d 100644
--- a/meta-oe/classes/systemd.bbclass
+++ b/meta-oe/classes/systemd.bbclass
@@ -127,6 +127,8 @@  python populate_packages_prepend () {
 		bb.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d)
 
 
-	for pkg_systemd in d.getVar('SYSTEMD_PACKAGES', 1).split():
-		systemd_generate_package_scripts(pkg_systemd)
+	# run all modifications once when creating package
+	if os.path.exists('${D}'):
+		for pkg_systemd in d.getVar('SYSTEMD_PACKAGES', 1).split():
+			systemd_generate_package_scripts(pkg_systemd)
 }