[yum-commits] Branch 'yum-3_2_X' - yum/__init__.py
skvidal at osuosl.org
skvidal at osuosl.org
Tue Mar 17 14:45:02 UTC 2009
yum/__init__.py | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
New commits:
commit 033952b0b410901e62b5381f874c9fd9a6719b6a
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Tue Mar 17 10:42:39 2009 -0400
move around the error output so if someone specifies a pkg they don't have installed but do have an update
for (i386->i586 update path, for example) then it won't output a confusing message.
diff --git a/yum/__init__.py b/yum/__init__.py
index db3bc1f..cd98260 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -2727,18 +2727,17 @@ class YumBase(depsolve.Depsolve):
except yum.Errors.YumBaseError, e:
self.logger.critical(_('%s') % e)
- if not depmatches:
- self.logger.critical(_('No Match for argument: %s') % arg)
- else:
- instpkgs.extend(depmatches)
+ instpkgs.extend(depmatches)
# Always look for available packages, it doesn't seem to do any
# harm (apart from some time). And it fixes weird edge cases where
# "update a" (which requires a new b) is different from "update b"
- if True or not instpkgs:
- (e, m, u) = self.pkgSack.matchPackageNames([kwargs['pattern']])
- availpkgs.extend(e)
- availpkgs.extend(m)
+ (e, m, u) = self.pkgSack.matchPackageNames([kwargs['pattern']])
+ availpkgs.extend(e)
+ availpkgs.extend(m)
+
+ if not availpkgs and not instpkgs:
+ self.logger.critical(_('No Match for argument: %s') % arg)
else: # we have kwargs, sort them out.
nevra_dict = self._nevra_kwarg_parse(kwargs)
More information about the Yum-commits
mailing list