diff options
-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 () { | |||
334 | 334 | ||
335 | mapping_rename_hook(localdata) | 335 | mapping_rename_hook(localdata) |
336 | 336 | ||
337 | def debian_cmp_remap(var): | ||
338 | # In debian '>' and '<' do not mean what it appears they mean | ||
339 | # '<' = less or equal | ||
340 | # '>' = greater or equal | ||
341 | # adjust these to the '<<' and '>>' equivalents | ||
342 | # | ||
343 | for dep in var: | ||
344 | if (var[dep] or "").startswith("< "): | ||
345 | var[dep] = var[dep].replace("< ", "<< ") | ||
346 | elif (var[dep] or "").startswith("> "): | ||
347 | var[dep] = var[dep].replace("> ", ">> ") | ||
348 | |||
337 | rdepends = bb.utils.explode_dep_versions(localdata.getVar("RDEPENDS", True) or "") | 349 | rdepends = bb.utils.explode_dep_versions(localdata.getVar("RDEPENDS", True) or "") |
350 | debian_cmp_remap(rdepends) | ||
338 | for dep in rdepends: | 351 | for dep in rdepends: |
339 | if '*' in dep: | 352 | if '*' in dep: |
340 | del rdepends[dep] | 353 | del rdepends[dep] |
341 | rrecommends = bb.utils.explode_dep_versions(localdata.getVar("RRECOMMENDS", True) or "") | 354 | rrecommends = bb.utils.explode_dep_versions(localdata.getVar("RRECOMMENDS", True) or "") |
355 | debian_cmp_remap(rrecommends) | ||
342 | for dep in rrecommends: | 356 | for dep in rrecommends: |
343 | if '*' in dep: | 357 | if '*' in dep: |
344 | del rrecommends[dep] | 358 | del rrecommends[dep] |
345 | rsuggests = bb.utils.explode_dep_versions(localdata.getVar("RSUGGESTS", True) or "") | 359 | rsuggests = bb.utils.explode_dep_versions(localdata.getVar("RSUGGESTS", True) or "") |
360 | debian_cmp_remap(rsuggests) | ||
346 | rprovides = bb.utils.explode_dep_versions(localdata.getVar("RPROVIDES", True) or "") | 361 | rprovides = bb.utils.explode_dep_versions(localdata.getVar("RPROVIDES", True) or "") |
362 | debian_cmp_remap(rprovides) | ||
347 | rreplaces = bb.utils.explode_dep_versions(localdata.getVar("RREPLACES", True) or "") | 363 | rreplaces = bb.utils.explode_dep_versions(localdata.getVar("RREPLACES", True) or "") |
364 | debian_cmp_remap(rreplaces) | ||
348 | rconflicts = bb.utils.explode_dep_versions(localdata.getVar("RCONFLICTS", True) or "") | 365 | rconflicts = bb.utils.explode_dep_versions(localdata.getVar("RCONFLICTS", True) or "") |
366 | debian_cmp_remap(rconflicts) | ||
349 | if rdepends: | 367 | if rdepends: |
350 | ctrlfile.write("Depends: %s\n" % unicode(bb.utils.join_deps(rdepends))) | 368 | ctrlfile.write("Depends: %s\n" % unicode(bb.utils.join_deps(rdepends))) |
351 | if rsuggests: | 369 | 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 () { | |||
372 | 372 | ||
373 | mapping_rename_hook(localdata) | 373 | mapping_rename_hook(localdata) |
374 | 374 | ||
375 | def debian_cmp_remap(var): | ||
376 | # In debian '>' and '<' do not mean what it appears they mean | ||
377 | # '<' = less or equal | ||
378 | # '>' = greater or equal | ||
379 | # adjust these to the '<<' and '>>' equivalents | ||
380 | # | ||
381 | for dep in var: | ||
382 | if (var[dep] or "").startswith("< "): | ||
383 | var[dep] = var[dep].replace("< ", "<< ") | ||
384 | elif (var[dep] or "").startswith("> "): | ||
385 | var[dep] = var[dep].replace("> ", ">> ") | ||
386 | |||
375 | rdepends = bb.utils.explode_dep_versions(localdata.getVar("RDEPENDS", True) or "") | 387 | rdepends = bb.utils.explode_dep_versions(localdata.getVar("RDEPENDS", True) or "") |
388 | debian_cmp_remap(rdepends) | ||
376 | rrecommends = bb.utils.explode_dep_versions(localdata.getVar("RRECOMMENDS", True) or "") | 389 | rrecommends = bb.utils.explode_dep_versions(localdata.getVar("RRECOMMENDS", True) or "") |
390 | debian_cmp_remap(rrecommends) | ||
377 | rsuggests = bb.utils.explode_dep_versions(localdata.getVar("RSUGGESTS", True) or "") | 391 | rsuggests = bb.utils.explode_dep_versions(localdata.getVar("RSUGGESTS", True) or "") |
392 | debian_cmp_remap(rsuggests) | ||
378 | rprovides = bb.utils.explode_dep_versions(localdata.getVar("RPROVIDES", True) or "") | 393 | rprovides = bb.utils.explode_dep_versions(localdata.getVar("RPROVIDES", True) or "") |
394 | debian_cmp_remap(rprovides) | ||
379 | rreplaces = bb.utils.explode_dep_versions(localdata.getVar("RREPLACES", True) or "") | 395 | rreplaces = bb.utils.explode_dep_versions(localdata.getVar("RREPLACES", True) or "") |
396 | debian_cmp_remap(rreplaces) | ||
380 | rconflicts = bb.utils.explode_dep_versions(localdata.getVar("RCONFLICTS", True) or "") | 397 | rconflicts = bb.utils.explode_dep_versions(localdata.getVar("RCONFLICTS", True) or "") |
398 | debian_cmp_remap(rconflicts) | ||
381 | 399 | ||
382 | if rdepends: | 400 | if rdepends: |
383 | ctrlfile.write("Depends: %s\n" % bb.utils.join_deps(rdepends)) | 401 | ctrlfile.write("Depends: %s\n" % bb.utils.join_deps(rdepends)) |