diff options
author | Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> | 2019-01-18 09:42:09 +0100 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2019-01-19 23:05:17 -0800 |
commit | 9cce0dad3f45b15f8f069a552ac6c91b9dfdd769 (patch) | |
tree | 08732dfbc1fc091e288e460174010454b08d427c | |
parent | portagetree: getname and portroot DeprecationWarning (diff) | |
download | portage-9cce0dad3f45b15f8f069a552ac6c91b9dfdd769.tar.gz portage-9cce0dad3f45b15f8f069a552ac6c91b9dfdd769.tar.bz2 portage-9cce0dad3f45b15f8f069a552ac6c91b9dfdd769.zip |
emerge: compare new slot USE to installed slot
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 <Arfrever@Apache.Org>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
-rw-r--r-- | lib/_emerge/resolver/output.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/_emerge/resolver/output.py b/lib/_emerge/resolver/output.py index 24340576c..ed88cc51f 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,14 @@ 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. + pkg_info.previous_pkg = cp_matches[-1] return pkg_info |