summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico2012-09-14 01:37:19 (GMT)
committerZac Medico2012-09-14 01:37:19 (GMT)
commitdb2e6f614169307e1c9cca9f8bab63f724547db4 (patch)
tree7310b56800315acecc182298419ddd596cae0b8d
parent156bf1b09a263217e9de5d0d14934cc295121f0a (diff)
merge list: distinguish reinstall with red "r"
This is for reinstall due to slot or sub-slot change of a dependency when the := slot operator is used.
-rw-r--r--man/emerge.13
-rw-r--r--pym/_emerge/resolver/output.py7
-rw-r--r--pym/_emerge/resolver/output_helpers.py8
3 files changed, 15 insertions, 3 deletions
diff --git a/man/emerge.1 b/man/emerge.1
index 65eefa2..8474cf9 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -619,7 +619,8 @@ N new (not yet installed)
S new SLOT installation (side-by-side versions)
U updating (to another version)
D downgrading (best version seems lower)
-R replacing (remerging same version))
+r reinstall (forced due to slot or sub\-slot change of a dependency)
+R replacing (remerging same version)
F fetch restricted (must be manually downloaded)
f fetch restricted (already downloaded)
I interactive (requires user input)
diff --git a/pym/_emerge/resolver/output.py b/pym/_emerge/resolver/output.py
index 11e668b..3325a42 100644
--- a/pym/_emerge/resolver/output.py
+++ b/pym/_emerge/resolver/output.py
@@ -790,6 +790,13 @@ class Display(object):
pkg_info = self.set_pkg_info(pkg, ordered)
pkg_info.oldbest_list, myinslotlist = \
self._get_installed_best(pkg, pkg_info)
+ if ordered and pkg_info.merge and \
+ not pkg_info.attr_display.new:
+ for arg, atom in depgraph._iter_atoms_for_pkg(pkg):
+ if arg.force_reinstall:
+ pkg_info.attr_display.force_reinstall = True
+ break
+
self.verboseadd = ""
if self.quiet_repo_display:
self.repoadd = None
diff --git a/pym/_emerge/resolver/output_helpers.py b/pym/_emerge/resolver/output_helpers.py
index 41dc324..be4ea4a 100644
--- a/pym/_emerge/resolver/output_helpers.py
+++ b/pym/_emerge/resolver/output_helpers.py
@@ -641,6 +641,7 @@ class PkgInfo(object):
class PkgAttrDisplay(SlotObject):
__slots__ = ("downgrade", "fetch_restrict", "fetch_restrict_satisfied",
+ "force_reinstall",
"interactive", "mask", "new", "new_slot", "new_version", "replace")
def __str__(self):
@@ -651,8 +652,11 @@ class PkgAttrDisplay(SlotObject):
else:
output.append(" ")
- if self.new:
- output.append(green("N"))
+ if self.new or self.force_reinstall:
+ if self.force_reinstall:
+ output.append(red("r"))
+ else:
+ output.append(green("N"))
else:
output.append(" ")