diff options
| author | Andreas Müller <schnitzeltony@googlemail.com> | 2012-02-16 02:02:57 +0000 |
|---|---|---|
| committer | Koen Kooi <koen@dominion.thruhere.net> | 2012-02-23 16:46:31 +0100 |
| commit | eb6c7f77b7c1e9b1ba377bfb4fb2f0c6735c604f (patch) | |
| tree | 964a5483e00989f1be0f11779fb7ffbe6197d3ad | |
| parent | 3502ef4afd1086fde15035a4a6ed0aab01d4a92c (diff) | |
| download | meta-openembedded-eb6c7f77b7c1e9b1ba377bfb4fb2f0c6735c604f.tar.gz | |
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>
| -rw-r--r-- | meta-oe/classes/systemd.bbclass | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/meta-oe/classes/systemd.bbclass b/meta-oe/classes/systemd.bbclass index a99036c01c..651735755a 100644 --- a/meta-oe/classes/systemd.bbclass +++ b/meta-oe/classes/systemd.bbclass | |||
| @@ -72,7 +72,7 @@ python __anonymous() { | |||
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | python populate_packages_prepend () { | 74 | python populate_packages_prepend () { |
| 75 | def systemd_package(pkg): | 75 | def systemd_generate_package_scripts(pkg): |
| 76 | bb.debug(1, 'adding systemd calls to postinst/postrm for %s' % pkg) | 76 | bb.debug(1, 'adding systemd calls to postinst/postrm for %s' % pkg) |
| 77 | localdata = bb.data.createCopy(d) | 77 | localdata = bb.data.createCopy(d) |
| 78 | overrides = bb.data.getVar("OVERRIDES", localdata, 1) | 78 | overrides = bb.data.getVar("OVERRIDES", localdata, 1) |
| @@ -96,10 +96,10 @@ python populate_packages_prepend () { | |||
| 96 | prerm += bb.data.getVar('systemd_prerm', localdata, 1) | 96 | prerm += bb.data.getVar('systemd_prerm', localdata, 1) |
| 97 | bb.data.setVar('pkg_prerm_%s' % pkg, prerm, d) | 97 | bb.data.setVar('pkg_prerm_%s' % pkg, prerm, d) |
| 98 | 98 | ||
| 99 | postrm = bb.data.getVar('pkg_postrm', localdata, 1) | 99 | postrm = bb.data.getVar('pkg_postrm', localdata, 1) |
| 100 | if not postrm: | 100 | if not postrm: |
| 101 | postrm = '#!/bin/sh\n' | 101 | postrm = '#!/bin/sh\n' |
| 102 | postrm += bb.data.getVar('systemd_postrm', localdata, 1) | 102 | postrm += bb.data.getVar('systemd_postrm', localdata, 1) |
| 103 | bb.data.setVar('pkg_postrm_%s' % pkg, postrm, d) | 103 | bb.data.setVar('pkg_postrm_%s' % pkg, postrm, d) |
| 104 | 104 | ||
| 105 | rdepends = explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 0) or bb.data.getVar('RDEPENDS', d, 0) or "") | 105 | 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 () { | |||
| 107 | bb.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d) | 107 | bb.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d) |
| 108 | 108 | ||
| 109 | 109 | ||
| 110 | pkgs = bb.data.getVar('SYSTEMD_PACKAGES', d, 1) | 110 | for pkg_systemd in d.getVar('SYSTEMD_PACKAGES', 1).split(): |
| 111 | for pkg in pkgs.split(): | 111 | systemd_generate_package_scripts(pkg_systemd) |
| 112 | systemd_package(pkg) | ||
| 113 | } | 112 | } |
