Skip to content

Commit

Permalink
yum-cron: fix the parsing of update_cmd. BZ 1294789
Browse files Browse the repository at this point in the history
This fixes the case when {minimal-}security-severity is used as
update_cmd in the conf file.  Previously, the method would incorrectly
handle those two cases the same way as "default".
  • Loading branch information
dmnks committed Feb 5, 2016
1 parent 5799842 commit ec2269a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions yum-cron/yum-cron.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,24 +427,23 @@ def refreshUpdates(self):
self.updateinfo_filters['sevs'] = sevs.split(",")


if self.opts.update_cmd in ('minimal', 'minimal-security'):
if update_cmd in ('minimal', 'minimal-security'):
if not yum.updateinfo.update_minimal(self):
return False
self.updateinfo_filters['bugfix'] = True
elif self.opts.update_cmd in ('default', 'security',
'default-security'):
elif update_cmd in ('default', 'security', 'default-security'):
if not self.update():
return False
else:
# return False ?
self.opts.update_cmd = 'default'
update_cmd = 'default'
if not self.update():
return False

if self.opts.update_cmd.endswith("security"):
if update_cmd.endswith("security"):
self.updateinfo_filters['security'] = True
yum.updateinfo.remove_txmbrs(self)
elif self.opts.update_cmd == 'minimal':
elif update_cmd == 'minimal':
self.updateinfo_filters['bugfix'] = True
yum.updateinfo.remove_txmbrs(self)

Expand Down

0 comments on commit ec2269a

Please sign in to comment.