[yum-git] Branch 'yum-3_2_X' - 2 commits - cli.py yum/sqlitesack.py
James Antill
james at linux.duke.edu
Fri Jul 25 03:33:14 UTC 2008
cli.py | 9 +++++++--
yum/sqlitesack.py | 2 +-
2 files changed, 8 insertions(+), 3 deletions(-)
New commits:
commit 3edf4c6105750086885c32b9eec8b9980e05af4e
Author: James Antill <james at and.org>
Date: Thu Jul 24 23:33:06 2008 -0400
Give nicer messages when we can't find things due to case sensitivity
diff --git a/cli.py b/cli.py
index 4d84b74..e536ec6 100644
--- a/cli.py
+++ b/cli.py
@@ -528,13 +528,18 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
except yum.Errors.InstallError:
self.verbose_logger.log(yum.logginglevels.INFO_2,
_('No package %s available.'), arg)
-
+ matches = self.doPackageLists('available', patterns=[arg],
+ ignore_case=True)
+ matches = set(map(lambda x: x.name, matches.available))
+ if matches:
+ msg = self.fmtKeyValFill(_(' * Maybe you meant: '),
+ ", ".join(matches))
+ self.verbose_logger.log(yum.logginglevels.INFO_2, msg)
if len(self.tsInfo) > oldcount:
return 2, [_('Package(s) to install')]
return 0, [_('Nothing to do')]
-
def updatePkgs(self, userlist, quiet=0):
"""take user commands and populate transaction wrapper with
packages to be updated"""
commit c6da933031830f528f3319f18536070634e272e1
Author: James Antill <james at and.org>
Date: Thu Jul 24 23:31:15 2008 -0400
Return the correct thing for skipped matchPackageNames, eg. 'yum update blah'
diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
index 2a1de81..8bb5248 100644
--- a/yum/sqlitesack.py
+++ b/yum/sqlitesack.py
@@ -1025,7 +1025,7 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
@catchSqliteException
def matchPackageNames(self, pkgspecs):
if self._skip_all():
- return []
+ return [], [], []
matched = []
exactmatch = []
More information about the Yum-cvs-commits
mailing list