[OE-core] [PATCH 5/5] update-alternatives: Add alternatives as a runtime provide

Mark Hatle mark.hatle at windriver.com
Tue Aug 2 00:17:42 UTC 2011


The following allows RPM to generate the SDK image, however without it
we get a failure because the system has nothing that provides /bin/sh.

Unfortunately the patch causes failures with ipk and deb packages because
they can not have filenames within their RPROVIDES.  I'm looking for some
type of a resolution to the issue, the only thing I can think of is to
add a way to manually add a FILERPROVIDE for the items.  This will require
changes to the way FILERPROVIDE is currently generated... but I'm not sure
how we can automatically generate the FILERPROVIDE values without the use of
python...

Any suggestions?

-----

Add the automatic alternatives as runtime provides.

This was discovered when programers were requiring "/bin/sh" and there
was nothing within the system providing "/bin/sh", however bash had an
alternative for /bin/sh that would satisfy this dependency.

NOTE: THIS BREAKS IPK AND DEB PACKAGE GENERATION!  IT SHOULD NOT BE
MERGED!

Signed-off-by: Mark Hatle <mark.hatle at windriver.com>
---
 meta/classes/update-alternatives.bbclass |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/meta/classes/update-alternatives.bbclass b/meta/classes/update-alternatives.bbclass
index ba81221..4cd680e 100644
--- a/meta/classes/update-alternatives.bbclass
+++ b/meta/classes/update-alternatives.bbclass
@@ -40,6 +40,8 @@
 ALTERNATIVE_PRIORITY = "10"
 ALTERNATIVE_LINK = "${bindir}/${ALTERNATIVE_NAME}"
 
+RPROVIDES_${PN} += "${@(d.getVar('ALTERNATIVE_LINK', True) or '') + ' ' + (d.getVar('ALTERNATIVE_LINKS', True) or '')}"
+
 update_alternatives_postinst() {
 update-alternatives --install ${ALTERNATIVE_LINK} ${ALTERNATIVE_NAME} ${ALTERNATIVE_PATH} ${ALTERNATIVE_PRIORITY}
 }
-- 
1.7.3.4





More information about the Openembedded-core mailing list