All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Aníbal Limón" <anibal.limon@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] package_rpm.bbclass: Dosen't filter Conflicts if found in Provides
Date: Tue, 18 Apr 2017 17:22:02 -0500	[thread overview]
Message-ID: <1492554122-29692-1-git-send-email-anibal.limon@linux.intel.com> (raw)

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

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
 meta/classes/package_rpm.bbclass | 26 --------------------------
 1 file changed, 26 deletions(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 07ab5cd..084546f 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -433,19 +433,6 @@ python write_specfile () {
         print_deps(splitrsuggests,  "Suggests", spec_preamble_bottom, d)
         print_deps(splitrprovides,  "Provides", spec_preamble_bottom, d)
         print_deps(splitrobsoletes, "Obsoletes", spec_preamble_bottom, d)
-
-        # conflicts can not be in a provide!  We will need to filter it.
-        if splitrconflicts:
-            depends_dict = bb.utils.explode_dep_versions2(splitrconflicts)
-            newdeps_dict = {}
-            for dep in depends_dict:
-                if dep not in splitrprovides:
-                    newdeps_dict[dep] = depends_dict[dep]
-            if newdeps_dict:
-                splitrconflicts = bb.utils.join_deps(newdeps_dict)
-            else:
-                splitrconflicts = ""
-
         print_deps(splitrconflicts,  "Conflicts", spec_preamble_bottom, d)
 
         spec_preamble_bottom.append('')
@@ -541,19 +528,6 @@ python write_specfile () {
     print_deps(srcrsuggests, "Suggests", spec_preamble_top, d)
     print_deps(srcrprovides + (" /bin/sh" if srcname.startswith("nativesdk-") else ""), "Provides", spec_preamble_top, d)
     print_deps(srcrobsoletes, "Obsoletes", spec_preamble_top, d)
-    
-    # conflicts can not be in a provide!  We will need to filter it.
-    if srcrconflicts:
-        depends_dict = bb.utils.explode_dep_versions2(srcrconflicts)
-        newdeps_dict = {}
-        for dep in depends_dict:
-            if dep not in srcrprovides:
-                newdeps_dict[dep] = depends_dict[dep]
-        if newdeps_dict:
-            srcrconflicts = bb.utils.join_deps(newdeps_dict)
-        else:
-            srcrconflicts = ""
-
     print_deps(srcrconflicts, "Conflicts", spec_preamble_top, d)
 
     spec_preamble_top.append('')
-- 
2.1.4



                 reply	other threads:[~2017-04-18 22:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1492554122-29692-1-git-send-email-anibal.limon@linux.intel.com \
    --to=anibal.limon@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.