summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2012-08-16 13:51:35 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2012-08-20 10:02:09 +0200
commite008cc8688504687b1e3a62a149a78d3da1375e7 (patch)
treedd1828bdaa62149d82a730a0b3d77d6c5d1d3416
parent695786ad0fac01f3dff2232a187e95ab7ef864b0 (diff)
downloadmeta-openembedded-e008cc8688504687b1e3a62a149a78d3da1375e7.tar.gz
systemd.bbclass: add option to disable automatic RRECOMMENDS pkg-systemd_base -> pkg-systemd
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--meta-systemd/classes/systemd.bbclass16
1 files changed, 10 insertions, 6 deletions
diff --git a/meta-systemd/classes/systemd.bbclass b/meta-systemd/classes/systemd.bbclass
index 4036f91ca..96d7f8f55 100644
--- a/meta-systemd/classes/systemd.bbclass
+++ b/meta-systemd/classes/systemd.bbclass
@@ -2,6 +2,8 @@ DEPENDS_append = " systemd-systemctl-native"
2 2
3SYSTEMD_AUTO_ENABLE ??= "enable" 3SYSTEMD_AUTO_ENABLE ??= "enable"
4 4
5SYSTEMD_AUTO_RRECOMMENDS ??= "enable"
6
5systemd_postinst() { 7systemd_postinst() {
6OPTS="" 8OPTS=""
7 9
@@ -208,12 +210,14 @@ python populate_packages_prepend () {
208 if len(rdepends_arr) == 0 and pkg_systemd != '${PN}' and not pkg_systemd_base in rdepends: 210 if len(rdepends_arr) == 0 and pkg_systemd != '${PN}' and not pkg_systemd_base in rdepends:
209 rdepends = '%s %s' % (rdepends, pkg_systemd_base) 211 rdepends = '%s %s' % (rdepends, pkg_systemd_base)
210 d.setVar('RDEPENDS_' + pkg_systemd, rdepends) 212 d.setVar('RDEPENDS_' + pkg_systemd, rdepends)
211 # RRECOMMENDS_${pkg_systemd_base} += pkg_systemd systemd 213 auto_rrecommends = d.getVar('SYSTEMD_AUTO_RRECOMMENDS', 1) or 'enable'
212 rrecommends = d.getVar('RRECOMMENDS_' + pkg_systemd_base, 1) or "" 214 if auto_rrecommends == 'enable':
213 # not rrecommending myself AND avoid double entries 215 # RRECOMMENDS_${pkg_systemd_base} += pkg_systemd systemd
214 if pkg_systemd != pkg_systemd_base and not pkg_systemd in rrecommends.split(): 216 rrecommends = d.getVar('RRECOMMENDS_' + pkg_systemd_base, 1) or ""
215 rrecommends = '%s %s' % (rrecommends, pkg_systemd) 217 # not rrecommending myself AND avoid double entries
216 d.setVar('RRECOMMENDS_' + pkg_systemd_base, rrecommends) 218 if pkg_systemd != pkg_systemd_base and not pkg_systemd in rrecommends.split():
219 rrecommends = '%s %s' % (rrecommends, pkg_systemd)
220 d.setVar('RRECOMMENDS_' + pkg_systemd_base, rrecommends)
217 221
218 # run all modifications once when creating package 222 # run all modifications once when creating package
219 if os.path.exists('${D}'): 223 if os.path.exists('${D}'):