From db2e6f614169307e1c9cca9f8bab63f724547db4 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 13 Sep 2012 18:37:19 -0700 Subject: [PATCH] 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. --- man/emerge.1 | 3 ++- pym/_emerge/resolver/output.py | 7 +++++++ pym/_emerge/resolver/output_helpers.py | 8 ++++++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/man/emerge.1 b/man/emerge.1 index 65eefa214..8474cf947 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 11e668bc9..3325a4201 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 41dc324a1..be4ea4acb 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(" ") -- 2.26.2