Fix display of installed version for packages, which have multiple slots
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org>
Mon, 23 Jan 2012 17:07:40 +0000 (18:07 +0100)
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org>
Mon, 23 Jan 2012 17:07:40 +0000 (18:07 +0100)
installed. Follow-up to commit 8118be36842a2db2eb72538e21a3b343773b3365.

pym/_emerge/resolver/output.py

index b10e802278f26b34efc0d72f302e9157d10d7d41..ed72b23b6d68e1b9531a259a881cfe5fde58453d 100644 (file)
@@ -755,8 +755,9 @@ class Display(object):
                installed_versions = self.vardb.match_pkgs(pkg.cp)
                if self.vardb.cpv_exists(pkg.cpv):
                        addl = "  "+yellow("R")+pkg_info.fetch_symbol+"  "
-                       if not self.quiet_repo_display and installed_versions[0].repo != pkg.repo:
-                               myoldbest = installed_versions
+                       installed_version = self.vardb.match_pkgs(pkg.cpv)[0]
+                       if not self.quiet_repo_display and installed_version.repo != pkg.repo:
+                               myoldbest = [installed_version]
                        if pkg_info.ordered:
                                if pkg_info.merge:
                                        self.counters.reinst += 1