[yum-git] Branch 'yum-3_2_X' - yum/__init__.py
Seth Vidal
skvidal at linux.duke.edu
Mon Jul 21 18:22:49 UTC 2008
yum/__init__.py | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
New commits:
commit 288ace08f79f993746a473e46171f8d6416e5c95
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Mon Jul 21 14:20:21 2008 -0400
silence the "No package matched to remove" lines during groupremove operations.
diff --git a/yum/__init__.py b/yum/__init__.py
index 3f9c8a6..02a0279 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -1774,7 +1774,7 @@ class YumBase(depsolve.Depsolve):
thisgroup.toremove = True
pkgs = thisgroup.packages
for pkg in thisgroup.packages:
- txmbrs = self.remove(name=pkg)
+ txmbrs = self.remove(name=pkg, silence_warnings=True)
txmbrs_used.extend(txmbrs)
for txmbr in txmbrs:
txmbr.groups.append(thisgroup.groupid)
@@ -2530,11 +2530,8 @@ class YumBase(depsolve.Depsolve):
ver=nevra_dict['version'], rel=nevra_dict['release'])
if len(pkgs) == 0:
- # FIXME we should give the caller some nice way to hush this warning
- # probably just a kwarg of 'silence_warnings' or something
- # b/c when this is called from groupRemove() it makes a lot of
- # garbage noise
- self.logger.warning(_("No package matched to remove"))
+ if not kwargs.get('silence_warnings', False):
+ self.logger.warning(_("No package matched to remove"))
for po in pkgs:
txmbr = self.tsInfo.addErase(po)
More information about the Yum-cvs-commits
mailing list