merge list: distinguish reinstall with red "r"
authorZac Medico <zmedico@gentoo.org>
Fri, 14 Sep 2012 01:37:19 +0000 (18:37 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 14 Sep 2012 01:37:19 +0000 (18:37 -0700)
This is for reinstall due to slot or sub-slot change of a dependency
when the := slot operator is used.

man/emerge.1
pym/_emerge/resolver/output.py
pym/_emerge/resolver/output_helpers.py

index 65eefa214a60b15e29b0b7c85ff27940a7d29938..8474cf9477c5ef9ef51b34b251951383589bde05 100644 (file)
@@ -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)
index 11e668bc9a6ded0127f3a4e0634c52deeb9a05e3..3325a4201702b9b7cd6a712053f25ddd7fc08e81 100644 (file)
@@ -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
index 41dc324a1d8d8b408deea98ba367f5fdd3f16e7f..be4ea4acbdc1b438678ecf4169c2d48ae3352b76 100644 (file)
@@ -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(" ")