yifengyou / rpms / yum

Forked from rpms/yum 3 years ago
Clone

Blame SOURCES/BZ-1192239-update-minimal.patch

5e9bef
commit bfeae9135994630147c4d6af8679f95157a90d76
5e9bef
Author: Valentina Mukhamedzhanova <vmukhame@redhat.com>
5e9bef
Date:   Fri Feb 14 13:54:30 2014 +0100
5e9bef
5e9bef
    Fix update-minimal traceback (#1048584) and ignoring updates.
5e9bef
5e9bef
diff --git a/yum/updateinfo.py b/yum/updateinfo.py
5e9bef
index 1cc207f..8d91f88 100644
5e9bef
--- a/yum/updateinfo.py
5e9bef
+++ b/yum/updateinfo.py
5e9bef
@@ -513,7 +513,7 @@ def update_minimal(base, extcmds=[]):
5e9bef
             if extcmds and not _match_sec_cmd(extcmds, name, notice):
5e9bef
                 continue
5e9bef
             if (not ndata and
5e9bef
-                not _ysp_should_filter_pkg(base, name, notice, used_map)):
5e9bef
+                not _ysp_should_filter_pkg(opts, name, notice, used_map)):
5e9bef
                 continue
5e9bef
             txmbrs.extend(base.update(name=pkgtup[0], arch=pkgtup[1],
5e9bef
                                       epoch=pkgtup[2],
5e9bef
diff --git a/yumcommands.py b/yumcommands.py
5e9bef
index c93faa1..4e3b730 100644
5e9bef
--- a/yumcommands.py
5e9bef
+++ b/yumcommands.py
5e9bef
@@ -4156,7 +4156,7 @@ class UpdateMinimalCommand(YumCommand):
5e9bef
 
5e9bef
         num = len(base.tsInfo)
5e9bef
         _upi.update_minimal(base, extcmds)
5e9bef
-        num -= len(base.tsInfo)
5e9bef
+        num = len(base.tsInfo) - num
5e9bef
         
5e9bef
         if num > 0:
5e9bef
             msg = '%d packages marked for minimal Update' % num