Blame SOURCES/BZ-1370134-yum-check-ignore-self-conflicts.patch

d2a170
commit 1ff69afbb78e9303a0d9859d941371eaedbb6842
d2a170
Author: James Antill <james@and.org>
d2a170
Date:   Mon Sep 22 16:22:42 2014 -0400
d2a170
d2a170
    Have "yum check" ignore self conflicts.
d2a170
d2a170
diff --git a/yum/rpmsack.py b/yum/rpmsack.py
d2a170
index 2d718c1..229e1a1 100644
d2a170
--- a/yum/rpmsack.py
d2a170
+++ b/yum/rpmsack.py
d2a170
@@ -1576,6 +1576,15 @@ class RPMDBPackageSack(PackageSackBase):
d2a170
 
d2a170
                 (req, flags, ver) = creq
d2a170
                 res = self.getProvides(req, flags, ver)
d2a170
+
d2a170
+                # Filter this pkg out, as self conflicts are allowed.
d2a170
+                nres = {}
d2a170
+                for conflicting_po in res:
d2a170
+                    if conflicting_po.pkgtup[0] == pkg.pkgtup[0] and conflicting_po.pkgtup[2:] == pkg.pkgtup[2:]:
d2a170
+                        continue
d2a170
+                    nres[conflicting_po] = res[conflicting_po]
d2a170
+                res = nres
d2a170
+
d2a170
                 if not res:
d2a170
                     continue
d2a170
                 flags = yum.depsolve.flags.get(flags, flags)