diff options
author | Aníbal Limón <anibal.limon@linux.intel.com> | 2017-04-18 17:22:02 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-04-20 07:55:25 +0100 |
commit | 9cb58a7f2b1329d60e8e7c9af2291f548cb651e0 (patch) | |
tree | f3ab327be511e3f6f6fb2378036935842b2372e9 /meta/classes/package_rpm.bbclass | |
parent | 33212a81298a1a74dd8b5ae9bea0b0e440d194c3 (diff) | |
download | poky-9cb58a7f2b1329d60e8e7c9af2291f548cb651e0.tar.gz |
package_rpm.bbclass: Dosen't filter Conflicts if found in Provides
This filter was add to make compilence with debian packaging but in
package_deb.bbclass is allowed to have the same values in Conflicts and
Provides.
With this filtering errors in recipe meta-data are hidden and could end
on install two packages that conflicts [2].
Reviewing the RPM spec from Fedora doesn't have anything that denies to
use the both Conflicts and Provides with the same value [3], also in
debian manual section 7.6.2 of [4] this behaviour is allowed to force
the removal of the conflicted package and RPM is compilence with this
behaviour after remove the filtering this is seen [5].
[1]
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=4b611b66743a5ec220aef34d796af63029bb5fd9
[2] https://bugzilla.yoctoproject.org/show_bug.cgi?id=9349#c9
[3]
https://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch-advanced-packaging.html
[4] https://www.debian.org/doc/debian-policy/ch-relationships.html
[5] https://bugzilla.yoctoproject.org/show_bug.cgi?id=9349#c12
(From OE-Core rev: 2ba9dd490d69544553fc8a837fb5034a6746ab51)
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-rw-r--r-- | meta/classes/package_rpm.bbclass | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index 07ab5cdd9e..084546f733 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass | |||
@@ -433,19 +433,6 @@ python write_specfile () { | |||
433 | print_deps(splitrsuggests, "Suggests", spec_preamble_bottom, d) | 433 | print_deps(splitrsuggests, "Suggests", spec_preamble_bottom, d) |
434 | print_deps(splitrprovides, "Provides", spec_preamble_bottom, d) | 434 | print_deps(splitrprovides, "Provides", spec_preamble_bottom, d) |
435 | print_deps(splitrobsoletes, "Obsoletes", spec_preamble_bottom, d) | 435 | print_deps(splitrobsoletes, "Obsoletes", spec_preamble_bottom, d) |
436 | |||
437 | # conflicts can not be in a provide! We will need to filter it. | ||
438 | if splitrconflicts: | ||
439 | depends_dict = bb.utils.explode_dep_versions2(splitrconflicts) | ||
440 | newdeps_dict = {} | ||
441 | for dep in depends_dict: | ||
442 | if dep not in splitrprovides: | ||
443 | newdeps_dict[dep] = depends_dict[dep] | ||
444 | if newdeps_dict: | ||
445 | splitrconflicts = bb.utils.join_deps(newdeps_dict) | ||
446 | else: | ||
447 | splitrconflicts = "" | ||
448 | |||
449 | print_deps(splitrconflicts, "Conflicts", spec_preamble_bottom, d) | 436 | print_deps(splitrconflicts, "Conflicts", spec_preamble_bottom, d) |
450 | 437 | ||
451 | spec_preamble_bottom.append('') | 438 | spec_preamble_bottom.append('') |
@@ -541,19 +528,6 @@ python write_specfile () { | |||
541 | print_deps(srcrsuggests, "Suggests", spec_preamble_top, d) | 528 | print_deps(srcrsuggests, "Suggests", spec_preamble_top, d) |
542 | print_deps(srcrprovides + (" /bin/sh" if srcname.startswith("nativesdk-") else ""), "Provides", spec_preamble_top, d) | 529 | print_deps(srcrprovides + (" /bin/sh" if srcname.startswith("nativesdk-") else ""), "Provides", spec_preamble_top, d) |
543 | print_deps(srcrobsoletes, "Obsoletes", spec_preamble_top, d) | 530 | print_deps(srcrobsoletes, "Obsoletes", spec_preamble_top, d) |
544 | |||
545 | # conflicts can not be in a provide! We will need to filter it. | ||
546 | if srcrconflicts: | ||
547 | depends_dict = bb.utils.explode_dep_versions2(srcrconflicts) | ||
548 | newdeps_dict = {} | ||
549 | for dep in depends_dict: | ||
550 | if dep not in srcrprovides: | ||
551 | newdeps_dict[dep] = depends_dict[dep] | ||
552 | if newdeps_dict: | ||
553 | srcrconflicts = bb.utils.join_deps(newdeps_dict) | ||
554 | else: | ||
555 | srcrconflicts = "" | ||
556 | |||
557 | print_deps(srcrconflicts, "Conflicts", spec_preamble_top, d) | 531 | print_deps(srcrconflicts, "Conflicts", spec_preamble_top, d) |
558 | 532 | ||
559 | spec_preamble_top.append('') | 533 | spec_preamble_top.append('') |