[Yum-devel] [PATCH 9/9] Add "version nogroups*" to version command, to ignore version groups data
James Antill
james at and.org
Sun Nov 8 20:26:43 UTC 2009
---
yumcommands.py | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/yumcommands.py b/yumcommands.py
index c0504a6..64c1c7d 100644
--- a/yumcommands.py
+++ b/yumcommands.py
@@ -1101,20 +1101,29 @@ class VersionCommand(YumCommand):
verbose = base.verbose_logger.isEnabledFor(logginglevels.DEBUG_3)
groups = {}
- gconf = yum.config.readVersionGroupsConfig()
+ if vcmd in ('nogroups', 'nogroups-installed', 'nogroups-available',
+ 'nogroups-all'):
+ gconf = []
+ if vcmd == 'nogroups':
+ vcmd = 'installed'
+ else:
+ vcmd = vcmd[len('nogroups-'):]
+ else:
+ gconf = yum.config.readVersionGroupsConfig()
+
for group in gconf:
groups[group] = set(gconf[group].pkglist)
if gconf[group].run_with_packages:
groups[group].update(base.run_with_package_names)
- if vcmd in ('grouplist'):
+ if vcmd == 'grouplist':
print _(" Yum version groups:")
for group in sorted(groups):
print " ", group
return 0, ['version grouplist']
- if vcmd in ('groupinfo'):
+ if vcmd == 'groupinfo':
for group in groups:
if group not in extcmds[1:]:
continue
--
1.6.2.5
More information about the Yum-devel
mailing list