summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@googlemail.com>2012-07-11 20:46:07 +0200
committerKoen Kooi <koen@dominion.thruhere.net>2012-07-16 09:39:05 +0200
commit264e5a44e1111f939b43c11bb9514a0b435918db (patch)
tree0d3cac977c4862a0f0f8fefa6560949b12d7d910
parent241e40a64a827183cae16bce94a4bf0264756624 (diff)
downloadmeta-openembedded-264e5a44e1111f939b43c11bb9514a0b435918db.tar.gz
systemd.bbclass: add *-systemd packages to RRECOMMENDS
-rw-r--r--meta-systemd/classes/systemd.bbclass26
1 files changed, 22 insertions, 4 deletions
diff --git a/meta-systemd/classes/systemd.bbclass b/meta-systemd/classes/systemd.bbclass
index 2e585c3ec..fce314da8 100644
--- a/meta-systemd/classes/systemd.bbclass
+++ b/meta-systemd/classes/systemd.bbclass
@@ -180,8 +180,21 @@ python populate_packages_prepend () {
180 raise bb.build.FuncFailed, "\n\nFor package %s SYSTEMD_SERVICE-entry %s does not exist" % \ 180 raise bb.build.FuncFailed, "\n\nFor package %s SYSTEMD_SERVICE-entry %s does not exist" % \
181 (pkg_systemd, service) 181 (pkg_systemd, service)
182 182
183 # *-systemd packages get RDEPENDS to systemd and their base package 183 """ Setup rdepends / rrecommmends as:
184 def systemd_add_rdepends(pkg_systemd): 184
185 -----------------------------
186 | pkg_systemd_base: 'foo' |
187 -----------------------------
188 | ^
189 | | --------------
190 rrecommends | | rdepends | 'systemd' |
191 | | ->--------------
192 V | / rdepends
193 ------------------------------/
194 | pkg_systemd: 'foo-systemd' |
195 ------------------------------
196 """
197 def systemd_add_rdepends_rrecommends(pkg_systemd):
185 # RDEPENDS_${pkg_systemd} += pkg_systemd_base systemd 198 # RDEPENDS_${pkg_systemd} += pkg_systemd_base systemd
186 rdepends = d.getVar('RDEPENDS_' + pkg_systemd, 1) or "" 199 rdepends = d.getVar('RDEPENDS_' + pkg_systemd, 1) or ""
187 rdepends_arr = rdepends.split() 200 rdepends_arr = rdepends.split()
@@ -195,13 +208,18 @@ python populate_packages_prepend () {
195 if len(rdepends_arr) == 0 and pkg_systemd != '${PN}' and not pkg_systemd_base in rdepends: 208 if len(rdepends_arr) == 0 and pkg_systemd != '${PN}' and not pkg_systemd_base in rdepends:
196 rdepends = '%s %s' % (rdepends, pkg_systemd_base) 209 rdepends = '%s %s' % (rdepends, pkg_systemd_base)
197 d.setVar('RDEPENDS_' + pkg_systemd, rdepends) 210 d.setVar('RDEPENDS_' + pkg_systemd, rdepends)
198 211 # RRECOMMENDS_${pkg_systemd_base} += pkg_systemd systemd
212 rrecommends = d.getVar('RRECOMMENDS_' + pkg_systemd_base, 1) or ""
213 # not rrecommending myself AND avoid double entries
214 if pkg_systemd != pkg_systemd_base and not pkg_systemd in rrecommends.split():
215 rrecommends = '%s %s' % (rrecommends, pkg_systemd)
216 d.setVar('RRECOMMENDS_' + pkg_systemd_base, rrecommends)
199 217
200 # run all modifications once when creating package 218 # run all modifications once when creating package
201 if os.path.exists('${D}'): 219 if os.path.exists('${D}'):
202 for pkg_systemd in d.getVar('SYSTEMD_PACKAGES', 1).split(): 220 for pkg_systemd in d.getVar('SYSTEMD_PACKAGES', 1).split():
203 if get_package_var(d, 'SYSTEMD_SERVICE', pkg_systemd) != "": 221 if get_package_var(d, 'SYSTEMD_SERVICE', pkg_systemd) != "":
204 systemd_generate_package_scripts(pkg_systemd) 222 systemd_generate_package_scripts(pkg_systemd)
205 systemd_add_rdepends(pkg_systemd) 223 systemd_add_rdepends_rrecommends(pkg_systemd)
206 systemd_check_services() 224 systemd_check_services()
207} 225}