diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-08-19 13:40:36 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-08-23 23:01:51 +0100 |
commit | 3409c4379559afbb1d1d29045582995147a33bbc (patch) | |
tree | 0290f09862a8b62eb479081786ecab293ff16f13 | |
parent | bd8018792155ae842952432900c8431feeaffe30 (diff) | |
download | openembedded-core-3409c4379559afbb1d1d29045582995147a33bbc.tar.gz openembedded-core-3409c4379559afbb1d1d29045582995147a33bbc.tar.bz2 openembedded-core-3409c4379559afbb1d1d29045582995147a33bbc.zip |
debian: Set RPROVIDES to include the original packagename when renaming
Currently its hard for a packagegroup recipe to depend on something who's name
can change unpredictably. We therefore add in RPROVIDES for the original
package name so that these are also available to use as dependencies.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/debian.bbclass | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/classes/debian.bbclass b/meta/classes/debian.bbclass index 47d3ed89d2..c859703669 100644 --- a/meta/classes/debian.bbclass +++ b/meta/classes/debian.bbclass @@ -52,6 +52,13 @@ python debian_package_name_hook () { return 0 return (s[stat.ST_MODE] & stat.S_IEXEC) + def add_rprovides(pkg, d): + newpkg = d.getVar('PKG_' + pkg) + if newpkg and newpkg != pkg: + provs = (d.getVar('RPROVIDES_' + pkg, True) or "").split() + if pkg not in provs: + d.appendVar('RPROVIDES_' + pkg, " " + pkg) + def auto_libname(packages, orig_pkg): sonames = [] has_bins = 0 @@ -99,6 +106,7 @@ python debian_package_name_hook () { (pkgname, devname) = soname_result for pkg in packages.split(): if (d.getVar('PKG_' + pkg) or d.getVar('DEBIAN_NOAUTONAME_' + pkg)): + add_rprovides(pkg, d) continue debian_pn = d.getVar('DEBIANNAME_' + pkg) if debian_pn: @@ -113,6 +121,9 @@ python debian_package_name_hook () { newpkg = mlpre + newpkg if newpkg != pkg: d.setVar('PKG_' + pkg, newpkg) + add_rprovides(pkg, d) + else: + add_rprovides(orig_pkg, d) # reversed sort is needed when some package is substring of another # ie in ncurses we get without reverse sort: |