summaryrefslogtreecommitdiff
path: root/meta/classes
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:07:58 +0000
commit8a4c5765fb56d17c3d82ff6db47863e934c9fcbe (patch)
tree8533c1a8ad9c03e08a083968263250e47c483d12 /meta/classes
parent17d27fd6e2750e6455f656159da56c3350c4b3cd (diff)
downloadopenembedded-core-8a4c5765fb56d17c3d82ff6db47863e934c9fcbe.tar.gz
openembedded-core-8a4c5765fb56d17c3d82ff6db47863e934c9fcbe.tar.bz2
openembedded-core-8a4c5765fb56d17c3d82ff6db47863e934c9fcbe.zip
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.) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-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 () {
alt_remove_links += '\tupdate-alternatives --remove %s %s\n' % (alt_name, alt_target)
if alt_setup_links:
+ # RDEPENDS setup
+ provider = d.getVar('VIRTUAL-RUNTIME_update-alternatives', True)
+ if provider:
+ #bb.note('adding runtime requirement for update-alternatives for %s' % pkg)
+ d.appendVar('RDEPENDS_%s' % pkg, ' ' + d.getVar('MLPREFIX') + provider)
+
bb.note('adding update-alternatives calls to postinst/postrm for %s' % pkg)
bb.note('%s' % alt_setup_links)
postinst = (d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True)) or '#!/bin/sh\n'