mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-11 04:49:58 +00:00
systemd.bbclass: cosmetics
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> Acked-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
committed by
Koen Kooi
parent
3502ef4afd
commit
eb6c7f77b7
@@ -72,7 +72,7 @@ python __anonymous() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
python populate_packages_prepend () {
|
python populate_packages_prepend () {
|
||||||
def systemd_package(pkg):
|
def systemd_generate_package_scripts(pkg):
|
||||||
bb.debug(1, 'adding systemd calls to postinst/postrm for %s' % pkg)
|
bb.debug(1, 'adding systemd calls to postinst/postrm for %s' % pkg)
|
||||||
localdata = bb.data.createCopy(d)
|
localdata = bb.data.createCopy(d)
|
||||||
overrides = bb.data.getVar("OVERRIDES", localdata, 1)
|
overrides = bb.data.getVar("OVERRIDES", localdata, 1)
|
||||||
@@ -96,10 +96,10 @@ python populate_packages_prepend () {
|
|||||||
prerm += bb.data.getVar('systemd_prerm', localdata, 1)
|
prerm += bb.data.getVar('systemd_prerm', localdata, 1)
|
||||||
bb.data.setVar('pkg_prerm_%s' % pkg, prerm, d)
|
bb.data.setVar('pkg_prerm_%s' % pkg, prerm, d)
|
||||||
|
|
||||||
postrm = bb.data.getVar('pkg_postrm', localdata, 1)
|
postrm = bb.data.getVar('pkg_postrm', localdata, 1)
|
||||||
if not postrm:
|
if not postrm:
|
||||||
postrm = '#!/bin/sh\n'
|
postrm = '#!/bin/sh\n'
|
||||||
postrm += bb.data.getVar('systemd_postrm', localdata, 1)
|
postrm += bb.data.getVar('systemd_postrm', localdata, 1)
|
||||||
bb.data.setVar('pkg_postrm_%s' % pkg, postrm, d)
|
bb.data.setVar('pkg_postrm_%s' % pkg, postrm, d)
|
||||||
|
|
||||||
rdepends = explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 0) or bb.data.getVar('RDEPENDS', d, 0) or "")
|
rdepends = explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 0) or bb.data.getVar('RDEPENDS', d, 0) or "")
|
||||||
@@ -107,7 +107,6 @@ python populate_packages_prepend () {
|
|||||||
bb.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d)
|
bb.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d)
|
||||||
|
|
||||||
|
|
||||||
pkgs = bb.data.getVar('SYSTEMD_PACKAGES', d, 1)
|
for pkg_systemd in d.getVar('SYSTEMD_PACKAGES', 1).split():
|
||||||
for pkg in pkgs.split():
|
systemd_generate_package_scripts(pkg_systemd)
|
||||||
systemd_package(pkg)
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user