Display EROOT when ROOT != "/".
authorZac Medico <zmedico@gentoo.org>
Mon, 19 Dec 2011 20:44:47 +0000 (12:44 -0800)
committerZac Medico <zmedico@gentoo.org>
Mon, 19 Dec 2011 20:44:47 +0000 (12:44 -0800)
Since commit a715b65f7bd36409c1283e6911265d1f4405ab7a, the Package.root
and RootConfig.root attributes refer to EROOT instead of ROOT.
Therefore, adjust display code so that EROOT is only displayed when
ROOT != "/".

pym/_emerge/MergeListItem.py
pym/_emerge/PackageMerge.py
pym/_emerge/Scheduler.py
pym/_emerge/depgraph.py
pym/_emerge/main.py
pym/_emerge/resolver/output.py
pym/_emerge/resolver/slot_collision.py

index 2176bf65a4d307d72afa89fe7f1c185f42dc411a..8086c689a6e3a6fa88bbd077989b310240eefacf 100644 (file)
@@ -68,7 +68,7 @@ class MergeListItem(CompositeTask):
                                        pkg_repo_name = "unknown repo"
                                msg += " from %s" % pkg_repo_name
 
-               if pkg.root != "/":
+               if pkg.root_config.settings["ROOT"] != "/":
                        msg += " %s %s" % (preposition, pkg.root)
 
                if not build_opts.pretend:
index f8fa04a389ea3fd360150a82a01f72409ab66509..eed34e99b5645aa861b73d81d7e4ee5b21b6bac2 100644 (file)
@@ -28,7 +28,7 @@ class PackageMerge(CompositeTask):
                        counter_str,
                        colorize("GOOD", pkg.cpv))
 
-               if pkg.root != "/":
+               if pkg.root_config.settings["ROOT"] != "/":
                        msg += " %s %s" % (preposition, pkg.root)
 
                if not self.merge.build_opts.fetchonly and \
index 3800b8b1c6b9a92424c01b8a7c79b7f714d97462..d09b474e134767cd1187d200b8c81cdaa6b4e6bd 100644 (file)
@@ -425,7 +425,7 @@ class Scheduler(PollScheduler):
                                msg = [""]
                                for pkg in interactive_tasks:
                                        pkg_str = "  " + colorize("INFORM", str(pkg.cpv))
-                                       if pkg.root != "/":
+                                       if pkg.root_config.settings["ROOT"] != "/":
                                                pkg_str += " for " + pkg.root
                                        msg.append(pkg_str)
                                msg.append("")
@@ -1251,7 +1251,7 @@ class Scheduler(PollScheduler):
 
                # Skip this if $ROOT != / since it shouldn't matter if there
                # are unsatisfied system runtime deps in this case.
-               if pkg.root != '/':
+               if pkg.root_config.settings["ROOT"] != "/":
                        return
 
                completed_tasks = self._completed_tasks
@@ -1711,7 +1711,7 @@ class Scheduler(PollScheduler):
                pkg = failed_pkg.pkg
                msg = "%s to %s %s" % \
                        (bad("Failed"), action, colorize("INFORM", pkg.cpv))
-               if pkg.root != "/":
+               if pkg.root_config.settings["ROOT"] != "/":
                        msg += " %s %s" % (preposition, pkg.root)
 
                log_path = self._locate_failure_log(failed_pkg)
@@ -1841,7 +1841,7 @@ class Scheduler(PollScheduler):
                        pkg = task
                        msg = "emerge --keep-going:" + \
                                " %s" % (pkg.cpv,)
-                       if pkg.root != "/":
+                       if pkg.root_config.settings["ROOT"] != "/":
                                msg += " for %s" % (pkg.root,)
                        msg += " dropped due to unsatisfied dependency."
                        for line in textwrap.wrap(msg, msg_width):
index 93819c611ba64a87af380d56456dd156f4fda926..2c44ce1d3ab5cae16dfaed260d52fb60f7186158 100644 (file)
@@ -594,7 +594,7 @@ class depgraph(object):
 
                for pkg, flags in self._dynamic_config.ignored_binaries.items():
                        writemsg("    =%s" % pkg.cpv, noiselevel=-1)
-                       if pkg.root != '/':
+                       if pkg.root_config.settings["ROOT"] != "/":
                                writemsg(" for %s" % (pkg.root,), noiselevel=-1)
                        writemsg("\n        use flag(s): %s\n" % ", ".join(sorted(flags)),
                                noiselevel=-1)
@@ -679,7 +679,7 @@ class depgraph(object):
                                "due to unsatisfied dependencies:\n\n", noiselevel=-1)
 
                        writemsg(str(pkg.slot_atom), noiselevel=-1)
-                       if pkg.root != '/':
+                       if pkg.root_config.settings["ROOT"] != "/":
                                writemsg(" for %s" % (pkg.root,), noiselevel=-1)
                        writemsg("\n", noiselevel=-1)
 
@@ -695,7 +695,7 @@ class depgraph(object):
                                "!!! triggered by backtracking:\n\n", noiselevel=-1)
                        for pkg, parent_atoms in backtrack_masked:
                                writemsg(str(pkg.slot_atom), noiselevel=-1)
-                               if pkg.root != '/':
+                               if pkg.root_config.settings["ROOT"] != "/":
                                        writemsg(" for %s" % (pkg.root,), noiselevel=-1)
                                writemsg("\n", noiselevel=-1)
 
@@ -712,7 +712,7 @@ class depgraph(object):
                indent = "  "
                for pkg, parent_atoms in missed_updates:
                        msg.append(str(pkg.slot_atom))
-                       if pkg.root != '/':
+                       if pkg.root_config.settings["ROOT"] != "/":
                                msg.append(" for %s" % (pkg.root,))
                        msg.append("\n\n")
 
@@ -2930,7 +2930,7 @@ class depgraph(object):
                        xinfo = _unicode_decode('"%s"') % (myparent,)
                # Discard null/ from failed cpv_expand category expansion.
                xinfo = xinfo.replace("null/", "")
-               if root != "/":
+               if root != self._frozen_config._running_root.root:
                        xinfo = "%s for %s" % (xinfo, root)
                masked_packages = []
                missing_use = []
index 0a9bd1d70bd5445bec0a9dd85d2697a9649ac339..d02f2a60588792976a0ad39030074382c5247944 100644 (file)
@@ -1547,9 +1547,10 @@ def repo_name_duplicate_check(trees):
 
 def config_protect_check(trees):
        for root, root_trees in trees.items():
-               if not root_trees["root_config"].settings.get("CONFIG_PROTECT"):
+               settings = root_trees["root_config"].settings
+               if not settings.get("CONFIG_PROTECT"):
                        msg = "!!! CONFIG_PROTECT is empty"
-                       if root != "/":
+                       if settings["ROOT"] != "/":
                                msg += " for '%s'" % root
                        msg += "\n"
                        writemsg_level(msg, level=logging.WARN, noiselevel=-1)
index b73b19061941e8f1b32d992efbedf444d76017df..bed5e44e8ec766208c767e6be2360215d4fadd15 100644 (file)
@@ -833,7 +833,7 @@ class Display(object):
                                if self.include_mask_str():
                                        addl += self.gen_mask_str(pkg)
 
-                               if pkg.root != "/":
+                               if pkg.root_config.settings["ROOT"] != "/":
                                        if pkg_info.oldbest:
                                                pkg_info.oldbest += " "
                                        if self.conf.columns:
index 320713882923458cddb875cd4143d031b702fb43..1d522aabd61e7e2d501e5c30f3b8a8200c5e8cdc 100644 (file)
@@ -244,7 +244,7 @@ class slot_conflict_handler(object):
                for (slot_atom, root), pkgs \
                        in self.slot_collision_info.items():
                        msg.append(str(slot_atom))
-                       if root != '/':
+                       if root != self.depgraph._frozen_config._running_root.root:
                                msg.append(" for %s" % (root,))
                        msg.append("\n\n")