This is needed so we get available/old_available/reinstall correct, but
we still can't put the other installed packages in the "install" list
(because then list all foo-3* will show foo-2 packages, which is bad).
This means that the colouring is still "wrong", but meh.
---
yum/__init__.py | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/yum/__init__.py b/yum/__init__.py
index 0ace29d..e90e948 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -2574,10 +2574,21 @@ class YumBase(depsolve.Depsolve):
key = (pkg.name, pkg.arch)
if pkg.pkgtup in dinst:
reinstall_available.append(pkg)
- elif key not in ndinst or pkg.verGT(ndinst[key]):
- available.append(pkg)
else:
- old_available.append(pkg)
+ if (self.allowedMultipleInstalls(pkg) or
+ key not in ndinst):
+ # Might be because pattern specified a version, so
+ # we need to do a search for name/arch to find any
+ # installed.
+ ipkgs = self.rpmdb.searchNevra(pkg.name,
+ arch=pkg.arch)
+ if ipkgs:
+ ndinst[key] = sorted(ipkgs)[-1]
+
+ if key not in ndinst or pkg.verGT(ndinst[key]):
+ available.append(pkg)
+ else:
+ old_available.append(pkg)
# produce the updates list of tuples
elif pkgnarrow == 'updates':
--
1.7.6.4
_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel