1 |
commit: 9cce0dad3f45b15f8f069a552ac6c91b9dfdd769 |
2 |
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org> |
3 |
AuthorDate: Fri Jan 18 08:42:09 2019 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 20 07:05:17 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=9cce0dad |
7 |
|
8 |
emerge: compare new slot USE to installed slot |
9 |
|
10 |
For new-slot package installation, show USE flags added/deleted in |
11 |
comparison with highest installed other-slot package instance |
12 |
|
13 |
Bug: https://bugs.gentoo.org/675756 |
14 |
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org> |
15 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
16 |
|
17 |
lib/_emerge/resolver/output.py | 13 +++++++++---- |
18 |
1 file changed, 9 insertions(+), 4 deletions(-) |
19 |
|
20 |
diff --git a/lib/_emerge/resolver/output.py b/lib/_emerge/resolver/output.py |
21 |
index 24340576c..ed88cc51f 100644 |
22 |
--- a/lib/_emerge/resolver/output.py |
23 |
+++ b/lib/_emerge/resolver/output.py |
24 |
@@ -1,4 +1,4 @@ |
25 |
-# Copyright 2010-2018 Gentoo Foundation |
26 |
+# Copyright 2010-2019 Gentoo Authors |
27 |
# Distributed under the terms of the GNU General Public License v2 |
28 |
|
29 |
"""Resolver output display operation. |
30 |
@@ -673,9 +673,14 @@ class Display(object): |
31 |
pkg_info.previous_pkg = self.vardb.match_pkgs( |
32 |
Atom('=' + pkg.cpv))[0] |
33 |
else: |
34 |
- slot_matches = self.vardb.match_pkgs(pkg.slot_atom) |
35 |
- if slot_matches: |
36 |
- pkg_info.previous_pkg = slot_matches[0] |
37 |
+ cp_slot_matches = self.vardb.match_pkgs(pkg.slot_atom) |
38 |
+ if cp_slot_matches: |
39 |
+ pkg_info.previous_pkg = cp_slot_matches[0] |
40 |
+ else: |
41 |
+ cp_matches = self.vardb.match_pkgs(Atom(pkg.cp)) |
42 |
+ if cp_matches: |
43 |
+ # Use highest installed other-slot package instance. |
44 |
+ pkg_info.previous_pkg = cp_matches[-1] |
45 |
|
46 |
return pkg_info |