]> code.ossystems Code Review - openembedded-core.git/commitdiff
package_rpm: Ensure alternatives links are reflected in rpm package dependencies
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 3 Aug 2011 15:32:03 +0000 (16:32 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 3 Aug 2011 16:40:54 +0000 (17:40 +0100)
Currently, if a file is provided as an alternative link within the package, rpm
doesn't see the dependency. This works out badly for dependencies such as /bin/sh
which scripts might require.

Since rpm detects and adds these dependencies we do need to ensure the dependency
information in the packages is correct. This patch does so for the rpm backend
ensuring internal consistency whilst the approach for addressing this problem in
the other package backends is considered.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package_rpm.bbclass

index abedc680059c9b1d2cfd8ba9c97b2cf723a543cf..f1232292f63f6d7ba3028f4331c0e689a3f2cc93 100644 (file)
@@ -501,6 +501,10 @@ python write_specfile () {
                splitrconflicts  = bb.data.getVar('RCONFLICTS', localdata, True) or ""
                splitrobsoletes  = []
 
+               # For now we need to manually supplement RPROVIDES with any update-alternatives links
+               if pkg == d.getVar("PN", True):
+                       splitrprovides = splitrprovides + " " + (d.getVar('ALTERNATIVE_LINK', True) or '') + " " + (d.getVar('ALTERNATIVE_LINKS', True) or '')
+
                # Gather special src/first package data
                if srcname == splitname:
                        srcrdepends    = splitrdepends