summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta/classes/package_deb.bbclass18
-rw-r--r--meta/classes/package_ipk.bbclass18
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))