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