Blame SOURCES/BZ-1347813-security-updates-count.patch
|
|
eb5f31 |
commit 5820dcdc3e6f9bf16e2c42d2bf37d4cbd16064dc
|
|
|
eb5f31 |
Author: Valentina Mukhamedzhanova <vmukhame@redhat.com>
|
|
|
eb5f31 |
Date: Thu Jul 21 20:38:28 2016 +0200
|
|
|
eb5f31 |
|
|
|
eb5f31 |
Fix count of applicable security updates. BZ 1347813
|
|
|
eb5f31 |
|
|
|
eb5f31 |
diff --git a/yum/updateinfo.py b/yum/updateinfo.py
|
|
|
eb5f31 |
index 7abe332..5dcd7df 100644
|
|
|
eb5f31 |
--- a/yum/updateinfo.py
|
|
|
eb5f31 |
+++ b/yum/updateinfo.py
|
|
|
eb5f31 |
@@ -445,7 +445,6 @@ def exclude_updates(base, filters=None):
|
|
|
eb5f31 |
pkgs = base.pkgSack.returnPackages()
|
|
|
eb5f31 |
name2tup = _get_name2oldpkgtup(base)
|
|
|
eb5f31 |
|
|
|
eb5f31 |
- cnt = 0
|
|
|
eb5f31 |
pkgs_to_del = []
|
|
|
eb5f31 |
for pkg in pkgs:
|
|
|
eb5f31 |
name = pkg.name
|
|
|
eb5f31 |
@@ -453,11 +452,13 @@ def exclude_updates(base, filters=None):
|
|
|
eb5f31 |
not _ysp_should_keep_pkg(opts, name2tup[name], md_info, used_map)):
|
|
|
eb5f31 |
pkgs_to_del.append(pkg.name)
|
|
|
eb5f31 |
continue
|
|
|
eb5f31 |
- cnt += 1
|
|
|
eb5f31 |
if pkgs_to_del:
|
|
|
eb5f31 |
for p in base.doPackageLists(pkgnarrow='available', patterns=pkgs_to_del, showdups=True).available:
|
|
|
eb5f31 |
ysp_del_pkg(p)
|
|
|
eb5f31 |
|
|
|
eb5f31 |
+ cnt = len(base.doPackageLists(pkgnarrow='updates').updates) + \
|
|
|
eb5f31 |
+ len(base.doPackageLists(pkgnarrow='obsoletes').obsoletes)
|
|
|
eb5f31 |
+
|
|
|
eb5f31 |
_ysp_chk_used_map(used_map, lambda x: base.verbose_logger.warn("%s", x))
|
|
|
eb5f31 |
|
|
|
eb5f31 |
if cnt:
|