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