mirror of
https://git.yoctoproject.org/poky
synced 2026-04-27 21:32:13 +02:00
classes: Update to use corrected bb.utils.explode_dep_versions2 API
The bb.utils.explode_dep_versions function has issues where dependency information can be lost. The API doesn't support maintaining the correct information so this changes to use a new function which correctly handles the data. This patch also fixes various points in the code to ensure that we do not have any duplicates in things that use explode_dep_versions. A new sanity test to test the contents of the R* variables is also added. [Some changes from Mark Hatle <mark.hatle@windriver.com>] (From OE-Core rev: 16a892431d0c0d03f8b561b92909cf2f11af4918) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -341,28 +341,29 @@ python do_package_deb () {
|
||||
# adjust these to the '<<' and '>>' equivalents
|
||||
#
|
||||
for dep in var:
|
||||
if (var[dep] or "").startswith("< "):
|
||||
var[dep] = var[dep].replace("< ", "<< ")
|
||||
elif (var[dep] or "").startswith("> "):
|
||||
var[dep] = var[dep].replace("> ", ">> ")
|
||||
for i, v in enumerate(var[dep]):
|
||||
if (v or "").startswith("< "):
|
||||
var[dep][i] = var[dep][i].replace("< ", "<< ")
|
||||
elif (v or "").startswith("> "):
|
||||
var[dep][i] = var[dep][i].replace("> ", ">> ")
|
||||
|
||||
rdepends = bb.utils.explode_dep_versions(localdata.getVar("RDEPENDS", True) or "")
|
||||
rdepends = bb.utils.explode_dep_versions2(localdata.getVar("RDEPENDS", True) or "")
|
||||
debian_cmp_remap(rdepends)
|
||||
for dep in rdepends:
|
||||
if '*' in dep:
|
||||
del rdepends[dep]
|
||||
rrecommends = bb.utils.explode_dep_versions(localdata.getVar("RRECOMMENDS", True) or "")
|
||||
rrecommends = bb.utils.explode_dep_versions2(localdata.getVar("RRECOMMENDS", True) or "")
|
||||
debian_cmp_remap(rrecommends)
|
||||
for dep in rrecommends:
|
||||
if '*' in dep:
|
||||
del rrecommends[dep]
|
||||
rsuggests = bb.utils.explode_dep_versions(localdata.getVar("RSUGGESTS", True) or "")
|
||||
rsuggests = bb.utils.explode_dep_versions2(localdata.getVar("RSUGGESTS", True) or "")
|
||||
debian_cmp_remap(rsuggests)
|
||||
rprovides = bb.utils.explode_dep_versions(localdata.getVar("RPROVIDES", True) or "")
|
||||
rprovides = bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES", True) or "")
|
||||
debian_cmp_remap(rprovides)
|
||||
rreplaces = bb.utils.explode_dep_versions(localdata.getVar("RREPLACES", True) or "")
|
||||
rreplaces = bb.utils.explode_dep_versions2(localdata.getVar("RREPLACES", True) or "")
|
||||
debian_cmp_remap(rreplaces)
|
||||
rconflicts = bb.utils.explode_dep_versions(localdata.getVar("RCONFLICTS", True) or "")
|
||||
rconflicts = bb.utils.explode_dep_versions2(localdata.getVar("RCONFLICTS", True) or "")
|
||||
debian_cmp_remap(rconflicts)
|
||||
if rdepends:
|
||||
ctrlfile.write("Depends: %s\n" % unicode(bb.utils.join_deps(rdepends)))
|
||||
|
||||
Reference in New Issue
Block a user