systemd.bbclass: run code in populate_packages_prepend only if ${D} exists

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>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
Andreas Müller
2012-02-22 14:00:10 +01:00
committed by Koen Kooi
parent 450417617a
commit 916b26ef7d
+4 -2
View File
@@ -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)
}