diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2012-09-29 19:19:11 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-10-02 11:16:10 +0100 |
commit | bbcc78d8ff03725ce5b3b65ce24025c3da45f2ab (patch) | |
tree | d6b23ecbad4e0c7e9f4ee39b234f87fdb03c51d5 /meta | |
parent | 6bd87edc383b40e300b0ef4bf851c39b698305cd (diff) | |
download | openembedded-core-bbcc78d8ff03725ce5b3b65ce24025c3da45f2ab.tar.gz openembedded-core-bbcc78d8ff03725ce5b3b65ce24025c3da45f2ab.tar.bz2 openembedded-core-bbcc78d8ff03725ce5b3b65ce24025c3da45f2ab.zip |
package_deb/ipk: Remap < and > to << and >>
In deb and ipk, < means <=, while > means >=... there is a different
operator << and >> that means < and >, so we map them when constructing
the packages.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/package_deb.bbclass | 18 | ||||
-rw-r--r-- | meta/classes/package_ipk.bbclass | 18 |
2 files changed, 36 insertions, 0 deletions
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass index 3b42d3b194..a25e5d783e 100644 --- a/meta/classes/package_deb.bbclass +++ b/meta/classes/package_deb.bbclass @@ -334,18 +334,36 @@ python do_package_deb () { mapping_rename_hook(localdata) + def debian_cmp_remap(var): + # In debian '>' and '<' do not mean what it appears they mean + # '<' = less or equal + # '>' = greater or equal + # 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("> ", ">> ") + rdepends = bb.utils.explode_dep_versions(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 "") + 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 "") + debian_cmp_remap(rsuggests) rprovides = bb.utils.explode_dep_versions(localdata.getVar("RPROVIDES", True) or "") + debian_cmp_remap(rprovides) rreplaces = bb.utils.explode_dep_versions(localdata.getVar("RREPLACES", True) or "") + debian_cmp_remap(rreplaces) rconflicts = bb.utils.explode_dep_versions(localdata.getVar("RCONFLICTS", True) or "") + debian_cmp_remap(rconflicts) if rdepends: ctrlfile.write("Depends: %s\n" % unicode(bb.utils.join_deps(rdepends))) if rsuggests: diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass index 59cb856847..281ce596d5 100644 --- a/meta/classes/package_ipk.bbclass +++ b/meta/classes/package_ipk.bbclass @@ -372,12 +372,30 @@ python do_package_ipk () { mapping_rename_hook(localdata) + def debian_cmp_remap(var): + # In debian '>' and '<' do not mean what it appears they mean + # '<' = less or equal + # '>' = greater or equal + # 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("> ", ">> ") + rdepends = bb.utils.explode_dep_versions(localdata.getVar("RDEPENDS", True) or "") + debian_cmp_remap(rdepends) rrecommends = bb.utils.explode_dep_versions(localdata.getVar("RRECOMMENDS", True) or "") + debian_cmp_remap(rrecommends) rsuggests = bb.utils.explode_dep_versions(localdata.getVar("RSUGGESTS", True) or "") + debian_cmp_remap(rsuggests) rprovides = bb.utils.explode_dep_versions(localdata.getVar("RPROVIDES", True) or "") + debian_cmp_remap(rprovides) rreplaces = bb.utils.explode_dep_versions(localdata.getVar("RREPLACES", True) or "") + debian_cmp_remap(rreplaces) rconflicts = bb.utils.explode_dep_versions(localdata.getVar("RCONFLICTS", True) or "") + debian_cmp_remap(rconflicts) if rdepends: ctrlfile.write("Depends: %s\n" % bb.utils.join_deps(rdepends)) |