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

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