diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-10-02 11:37:07 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-10-02 11:37:10 +0100 |
commit | 16a892431d0c0d03f8b561b92909cf2f11af4918 (patch) | |
tree | 7b4a6118cd4d711f0b736d50a0b2a380c2cd3c43 /meta/classes/package_deb.bbclass | |
parent | 48aa4b00cfb7f01195c6d20b7ba660715fe792ef (diff) | |
download | openembedded-core-contrib-16a892431d0c0d03f8b561b92909cf2f11af4918.tar.gz |
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>]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package_deb.bbclass')
-rw-r--r-- | meta/classes/package_deb.bbclass | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass index a25e5d783e2..d273cb0f847 100644 --- a/meta/classes/package_deb.bbclass +++ b/meta/classes/package_deb.bbclass @@ -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))) |