> yum --color=always list installed foo-1.2-3
> (i.e. wrongly show the latest installed package though we asked for
> an older version)?

You're right..  I thought this touches only dinst/ndinst hashes
and pkgSack queries still use the original pattern so it's all
safe, but there's also 'installed = dinst.values()'.

This seems to fix this (yum list installed kernel-666 is silent)

diff --git a/yum/__init__.py b/yum/__init__.py
index d1807c2..cecb99e 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -2530,6 +2530,10 @@ class YumBase(depsolve.Depsolve):
                 if key not in ndinst or po.verGT(ndinst[key]):
                     ndinst[key] = po
             installed = dinst.values()
+            if rpm_patterns != patterns:
+                # another pattern matching needed
+                exact, matched, unmatched = parsePackages(installed, patterns)
+                installed = exact + matched
                         
             if showdups:
                 avail = self.pkgSack.returnPackages(patterns=patterns,
_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to