From ddca3cca268c0a8ea493f6278aa7288ed31ecd05 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Fri, 18 Jan 2019 09:42:09 +0100 Subject: [PATCH] emerge: For new-slot package installation, show USE flags added/deleted in comparison with highest installed other-slot package instance Bug: https://bugs.gentoo.org/675756 Signed-off-by: Arfrever Frehtes Taifersar Arahesis --- lib/_emerge/resolver/output.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/_emerge/resolver/output.py b/lib/_emerge/resolver/output.py index 24340576c..05513ed9a 100644 --- a/lib/_emerge/resolver/output.py +++ b/lib/_emerge/resolver/output.py @@ -1,4 +1,4 @@ -# Copyright 2010-2018 Gentoo Foundation +# Copyright 2010-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 """Resolver output display operation. @@ -673,9 +673,15 @@ class Display(object): pkg_info.previous_pkg = self.vardb.match_pkgs( Atom('=' + pkg.cpv))[0] else: - slot_matches = self.vardb.match_pkgs(pkg.slot_atom) - if slot_matches: - pkg_info.previous_pkg = slot_matches[0] + cp_slot_matches = self.vardb.match_pkgs(pkg.slot_atom) + if cp_slot_matches: + pkg_info.previous_pkg = cp_slot_matches[0] + else: + cp_matches = self.vardb.match_pkgs(Atom(pkg.cp)) + if cp_matches: + # Use highest installed other-slot package instance. + self.vardb._cpv_sort_ascending(cp_matches) + pkg_info.previous_pkg = cp_matches[-1] return pkg_info -- 2.20.1