Skip to content

Commit

Permalink
Copy/Paste install for group upgrade lists into yum-cron output. BZ 1…
Browse files Browse the repository at this point in the history
…031374.
  • Loading branch information
james-antill committed Nov 18, 2013
1 parent 8b977a8 commit 05846f0
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions yum-cron/yum-cron.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,10 +426,31 @@ def _add_line(lines, data, a_wid, po, obsoletes=[]):

return a_wid


ninstalled = self.tsInfo.installed
ginstalled = {}
if self.conf.group_command == 'objects' and ninstalled:
# Show new pkgs. that are installed via. a group.
ninstalled = []
for txmbr in self.tsInfo.installed:
if not hasattr(txmbr, '_ugroup_member'):
ninstalled.append(txmbr)
continue
if txmbr._ugroup_member not in ginstalled:
ginstalled[txmbr._ugroup_member] = []
ginstalled[txmbr._ugroup_member].append(txmbr)

for grp in sorted(ginstalled, key=lambda x: x.ui_name):
action = _('Installing for group upgrade "%s"') % grp.ui_name
pkglist = ginstalled[grp]

lines = []
for txmbr in pkglist:
a_wid = _add_line(lines, data, a_wid, txmbr.po, txmbr.obsoletes)

pkglist_lines.append((action, lines))

# Iterate through the different groups of packages
for (action, pkglist) in [(_('Installing'), tsInfo.installed),
for (action, pkglist) in [(_('Installing'), ninstalled),
(_('Updating'), tsInfo.updated),
(_('Removing'), tsInfo.removed),
(_('Reinstalling'), tsInfo.reinstalled),
Expand Down

0 comments on commit 05846f0

Please sign in to comment.