[OE-core][dunfell 1/8] Revert "package: get_package_mapping: avoid dependency mapping if renamed package provides original name"

Steve Sakoman
2020-10-15T14:15:33Z

Breaks wireguard

This reverts commit 210ebed1e9c2285d6e457bf03d1f1a1f3ddc7fda.

Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
meta/classes/package.bbclass | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index cc64ddffc3..23ff4772fa 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -535,7 +535,7 @@ def copydebugsources(debugsrcdir, sources, d):
# Package data handling routines
#

-def get_package_mapping (pkg, basepkg, d, depversions=None):
+def get_package_mapping (pkg, basepkg, d):
import oe.packagedata

data = oe.packagedata.read_subpkgdata(pkg, d)
@@ -546,14 +546,6 @@ def get_package_mapping (pkg, basepkg, d, depversions=None):
if bb.data.inherits_class('allarch', d) and not d.getVar('MULTILIB_VARIANTS') \
and data[key] == basepkg:
return pkg
- if depversions == []:
- # Avoid returning a mapping if the renamed package rprovides its original name
- rprovkey = "RPROVIDES_%s" % pkg
- if rprovkey in data:
- if pkg in bb.utils.explode_dep_versions2(data[rprovkey]):
- bb.note("%s rprovides %s, not replacing the latter" % (data[key], pkg))
- return pkg
- # Do map to rewritten package name
return data[key]

return pkg
@@ -574,10 +566,8 @@ def runtime_mapping_rename (varname, pkg, d):

new_depends = {}
deps = bb.utils.explode_dep_versions2(d.getVar(varname) or "")
- for depend, depversions in deps.items():
- new_depend = get_package_mapping(depend, pkg, d, depversions)
- if depend != new_depend:
- bb.note("package name mapping done: %s -> %s" % (depend, new_depend))
+ for depend in deps:
+ new_depend = get_package_mapping(depend, pkg, d)
new_depends[new_depend] = deps[depend]

d.setVar(varname, bb.utils.join_deps(new_depends, commasep=False))
--
2.17.1