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

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