[yum-git] cli.py yum/__init__.py
James Bowes
jbowes at linux.duke.edu
Thu Jan 31 17:39:10 UTC 2008
cli.py | 24 ++----------------------
yum/__init__.py | 4 ++--
2 files changed, 4 insertions(+), 24 deletions(-)
New commits:
commit 9d028f507e5daca5c2d5ef5673d8d38e7ccabb08
Author: James Bowes <jbowes at redhat.com>
Date: Thu Jan 31 12:38:53 2008 -0500
Use remove's pattern kwarg for cli's erasePkgs
diff --git a/cli.py b/cli.py
index 0b267b6..e4e813e 100644
--- a/cli.py
+++ b/cli.py
@@ -582,28 +582,8 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
oldcount = len(self.tsInfo)
- installed = self.rpmdb.returnPackages()
-
- if len(userlist) > 0: # if it ain't well, that'd be real _bad_ :)
- exactmatch, matched, unmatched = yum.packages.parsePackages(
- installed, userlist, casematch=1)
- erases = yum.misc.unique(matched + exactmatch)
-
- if unmatched:
- for arg in unmatched:
- try:
- depmatches = self.returnInstalledPackagesByDep(arg)
- except yum.Errors.YumBaseError, e:
- self.logger.critical(_('%s') % e)
- continue
-
- if not depmatches:
- self.logger.critical(_('No Match for argument: %s') % arg)
- else:
- erases.extend(depmatches)
-
- for pkg in erases:
- self.remove(po=pkg)
+ for arg in userlist:
+ self.remove(pattern=arg)
if len(self.tsInfo) > oldcount:
change = len(self.tsInfo) - oldcount
diff --git a/yum/__init__.py b/yum/__init__.py
index 65d2554..63a8cb0 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -2283,8 +2283,8 @@ class YumBase(depsolve.Depsolve):
epoch=nevra_dict['epoch'], arch=nevra_dict['arch'],
ver=nevra_dict['version'], rel=nevra_dict['release'])
- if len(pkgs) == 0: # should this even be happening?
- self.logger.warning(_("No package matched to remove"))
+ if len(pkgs) == 0:
+ 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