[Yum-devel] [PATCH 2/2] Let resolvedep look for installed packages, output is as compat. as possible.

James Antill james at and.org
Wed Sep 28 16:05:13 UTC 2011


---
 cli.py |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/cli.py b/cli.py
index 2f4cabc..816a61b 100755
--- a/cli.py
+++ b/cli.py
@@ -1398,12 +1398,19 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
         """
         for arg in args:
             try:
+                ipkg = self.returnInstalledPackageByDep(arg)
+            except yum.Errors.YumBaseError:
+                ipkg = None
+            else:
+                self.verbose_logger.info(ipkg.envra)
+            try:
                 pkg = self.returnPackageByDep(arg)
             except yum.Errors.YumBaseError:
-                self.logger.critical(_('No Package Found for %s'), arg)
+                if not ipkg:
+                    self.logger.critical(_('No Package Found for %s'), arg)
             else:
-                msg = '%s:%s-%s-%s.%s' % (pkg.epoch, pkg.name, pkg.version, pkg.release, pkg.arch)
-                self.verbose_logger.info(msg)
+                if not pkg.verEQ(ipkg):
+                    self.verbose_logger.info(pkg.envra)
 
         return 0, []
     
-- 
1.7.6.2



More information about the Yum-devel mailing list