[oe-commits] Mark Hatle : update-alternatives.bbclass: Add missing runtime dependency

git at git.openembedded.org git at git.openembedded.org
Fri Dec 7 16:16:22 UTC 2012


Module: openembedded-core.git
Branch: master
Commit: 8a4c5765fb56d17c3d82ff6db47863e934c9fcbe
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=8a4c5765fb56d17c3d82ff6db47863e934c9fcbe

Author: Mark Hatle <mark.hatle at windriver.com>
Date:   Thu Dec  6 14:51:13 2012 -0600

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 at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/update-alternatives.bbclass |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/meta/classes/update-alternatives.bbclass b/meta/classes/update-alternatives.bbclass
index 4e1ff27..a3631ec 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'





More information about the Openembedded-commits mailing list