summaryrefslogtreecommitdiffstats
path: root/meta/classes/update-alternatives.bbclass
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-12-06 14:51:13 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-07 16:13:46 +0000
commit1d610990657789ac44d8a2fa09114f5a9326746a (patch)
tree21863e1d0b889646afe7e78497ce1b13d0659467 /meta/classes/update-alternatives.bbclass
parentd3154aa9f8b111066a4e2f5287f8d49075ed6253 (diff)
downloadpoky-1d610990657789ac44d8a2fa09114f5a9326746a.tar.gz
update-alternatives.bbclass: Add missing runtime dependency
When using update-alternatives, there should be a runtime dependency on ${VIRTUAL-RUNTIME_update-alternatives}. Without this, it's possible to get into a situation where the package is not installable. (If VIRTUAL-RUNTIME_update-alternatives is not defined, no requirement is added.) (From OE-Core rev: 8a4c5765fb56d17c3d82ff6db47863e934c9fcbe) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/update-alternatives.bbclass')
-rw-r--r--meta/classes/update-alternatives.bbclass6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/classes/update-alternatives.bbclass b/meta/classes/update-alternatives.bbclass
index 4e1ff27052..a3631eca7e 100644
--- a/meta/classes/update-alternatives.bbclass
+++ b/meta/classes/update-alternatives.bbclass
@@ -304,6 +304,12 @@ python populate_packages_prepend () {
304 alt_remove_links += '\tupdate-alternatives --remove %s %s\n' % (alt_name, alt_target) 304 alt_remove_links += '\tupdate-alternatives --remove %s %s\n' % (alt_name, alt_target)
305 305
306 if alt_setup_links: 306 if alt_setup_links:
307 # RDEPENDS setup
308 provider = d.getVar('VIRTUAL-RUNTIME_update-alternatives', True)
309 if provider:
310 #bb.note('adding runtime requirement for update-alternatives for %s' % pkg)
311 d.appendVar('RDEPENDS_%s' % pkg, ' ' + d.getVar('MLPREFIX') + provider)
312
307 bb.note('adding update-alternatives calls to postinst/postrm for %s' % pkg) 313 bb.note('adding update-alternatives calls to postinst/postrm for %s' % pkg)
308 bb.note('%s' % alt_setup_links) 314 bb.note('%s' % alt_setup_links)
309 postinst = (d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True)) or '#!/bin/sh\n' 315 postinst = (d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True)) or '#!/bin/sh\n'