Blame SOURCES/BZ-1294789-yum-cron-fix-update_cmd.patch

5e9bef
From ec2269ad7cbdbbd674d4fdbf5c670e43c937c2a6 Mon Sep 17 00:00:00 2001
5e9bef
From: Michal Domonkos <mdomonko@redhat.com>
5e9bef
Date: Tue, 2 Feb 2016 10:44:04 +0100
5e9bef
Subject: [PATCH] yum-cron: fix the parsing of update_cmd. BZ 1294789
5e9bef
5e9bef
This fixes the case when {minimal-}security-severity is used as
5e9bef
update_cmd in the conf file.  Previously, the method would incorrectly
5e9bef
handle those two cases the same way as "default".
5e9bef
---
5e9bef
 yum-cron/yum-cron.py | 11 +++++------
5e9bef
 1 file changed, 5 insertions(+), 6 deletions(-)
5e9bef
5e9bef
diff --git a/yum-cron/yum-cron.py b/yum-cron/yum-cron.py
5e9bef
index 20911af..039f537 100755
5e9bef
--- a/yum-cron/yum-cron.py
5e9bef
+++ b/yum-cron/yum-cron.py
5e9bef
@@ -427,24 +427,23 @@ class YumCronBase(yum.YumBase, YumOutput):
5e9bef
                 self.updateinfo_filters['sevs'] = sevs.split(",")
5e9bef
 
5e9bef
 
5e9bef
-            if self.opts.update_cmd in ('minimal', 'minimal-security'):
5e9bef
+            if update_cmd in ('minimal', 'minimal-security'):
5e9bef
                 if not yum.updateinfo.update_minimal(self):
5e9bef
                     return False
5e9bef
                 self.updateinfo_filters['bugfix'] = True
5e9bef
-            elif self.opts.update_cmd in ('default', 'security',
5e9bef
-                                          'default-security'):
5e9bef
+            elif update_cmd in ('default', 'security', 'default-security'):
5e9bef
                 if not self.update():
5e9bef
                     return False
5e9bef
             else:
5e9bef
                 # return False ?
5e9bef
-                self.opts.update_cmd = 'default'
5e9bef
+                update_cmd = 'default'
5e9bef
                 if not self.update():
5e9bef
                     return False
5e9bef
 
5e9bef
-            if self.opts.update_cmd.endswith("security"):
5e9bef
+            if update_cmd.endswith("security"):
5e9bef
                 self.updateinfo_filters['security'] = True
5e9bef
                 yum.updateinfo.remove_txmbrs(self)
5e9bef
-            elif self.opts.update_cmd == 'minimal':
5e9bef
+            elif update_cmd == 'minimal':
5e9bef
                 self.updateinfo_filters['bugfix'] = True
5e9bef
                 yum.updateinfo.remove_txmbrs(self)
5e9bef
 
5e9bef
-- 
5e9bef
2.5.0
5e9bef