Blame SOURCES/BZ-1292160-security-lists-wrong-arch-updates.patch

d2a170
commit 6b25184fcd5634d0abcdda0ed77e75a38a0d5186
d2a170
Author: Valentina Mukhamedzhanova <vmukhame@redhat.com>
d2a170
Date:   Wed Dec 16 16:28:48 2015 +0100
d2a170
d2a170
    Fix updateinfo to exclude wrong arch updates
d2a170
d2a170
diff --git a/yum/updateinfo.py b/yum/updateinfo.py
d2a170
index 59374af..3e6395e 100644
d2a170
--- a/yum/updateinfo.py
d2a170
+++ b/yum/updateinfo.py
d2a170
@@ -401,24 +401,17 @@ def exclude_updates(base, filters=None):
d2a170
 
d2a170
     used_map = _ysp_gen_used_map(opts)
d2a170
 
d2a170
-    # In theory the official API is:
d2a170
-    #
d2a170
-    # pkgs = base.pkgSack.returnPackages()
d2a170
-    #
d2a170
-    # ...however that is _extremely_ slow, deleting all packages. So we ask
d2a170
-    # for the list of update packages, which is all we care about.    
d2a170
     upds = base.doPackageLists(pkgnarrow='updates')
d2a170
-    pkgs = upds.updates
d2a170
+    tot = len(upds.updates)
d2a170
     # In theory we don't need to do this in some cases, but meh.
d2a170
     upds = base.doPackageLists(pkgnarrow='obsoletes')
d2a170
-    pkgs += upds.obsoletes
d2a170
+    tot += len(upds.obsoletes)
d2a170
 
d2a170
+    pkgs = conduit.getPackages()
d2a170
     name2tup = _get_name2oldpkgtup(base)
d2a170
     
d2a170
-    tot = 0
d2a170
     cnt = 0
d2a170
     for pkg in pkgs:
d2a170
-        tot += 1
d2a170
         name = pkg.name
d2a170
         if (name not in name2tup or
d2a170
             not _ysp_should_keep_pkg(opts, name2tup[name], md_info, used_map)):