depgraph: skip backtrack for fatal errors
authorZac Medico <zmedico@gentoo.org>
Thu, 3 Feb 2011 04:18:47 +0000 (20:18 -0800)
committerZac Medico <zmedico@gentoo.org>
Thu, 3 Feb 2011 05:08:07 +0000 (21:08 -0800)
pym/_emerge/depgraph.py

index 1458a8f1585bd652b138e09b6f2cec18cb68ecfc..de6ffccb7292b3b25114aabbe0298a49976a619f 100644 (file)
@@ -1616,6 +1616,7 @@ class depgraph(object):
                                if os.path.realpath(x) != \
                                        os.path.realpath(self._frozen_config.trees[myroot]["bintree"].getname(mykey)):
                                        writemsg(colorize("BAD", "\n*** You need to adjust PKGDIR to emerge this package.\n\n"), noiselevel=-1)
+                                       self._dynamic_config._skip_restart = True
                                        return 0, myfavorites
 
                                pkg = self._pkg(mykey, "binary", root_config,
@@ -1641,6 +1642,7 @@ class depgraph(object):
                                        if ebuild_path != os.path.join(os.path.realpath(tree_root),
                                                cp, os.path.basename(ebuild_path)):
                                                writemsg(colorize("BAD", "\n*** You need to adjust PORTDIR or PORTDIR_OVERLAY to emerge this package.\n\n"), noiselevel=-1)
+                                               self._dynamic_config._skip_restart = True
                                                return 0, myfavorites
                                        if mykey not in portdb.xmatch(
                                                "match-visible", portage.cpv_getkey(mykey)):
@@ -1660,6 +1662,7 @@ class depgraph(object):
                                if not x.startswith(myroot):
                                        portage.writemsg(("\n\n!!! '%s' does not start with" + \
                                                " $ROOT.\n") % x, noiselevel=-1)
+                                       self._dynamic_config._skip_restart = True
                                        return 0, []
                                # Queue these up since it's most efficient to handle
                                # multiple files in a single iter_owners() call.
@@ -1669,6 +1672,7 @@ class depgraph(object):
                                if not f.startswith(myroot):
                                        portage.writemsg(("\n\n!!! '%s' (resolved from '%s') does not start with" + \
                                                " $ROOT.\n") % (f, x), noiselevel=-1)
+                                       self._dynamic_config._skip_restart = True
                                        return 0, []
                                lookup_owners.append(f)
                        else:
@@ -1690,6 +1694,7 @@ class depgraph(object):
                                                noiselevel=-1)
                                        portage.writemsg("!!! Please check ebuild(5) for full details.\n")
                                        portage.writemsg("!!! (Did you specify a version but forget to prefix with '='?)\n")
+                                       self._dynamic_config._skip_restart = True
                                        return (0,[])
                                # Don't expand categories or old-style virtuals here unless
                                # necessary. Expansion of old-style virtuals here causes at
@@ -1747,6 +1752,7 @@ class depgraph(object):
                                        writemsg("\n\n", noiselevel=-1)
                                        ambiguous_package_name(x, expanded_atoms, root_config,
                                                self._frozen_config.spinner, self._frozen_config.myopts)
+                                       self._dynamic_config._skip_restart = True
                                        return False, myfavorites
                                if expanded_atoms:
                                        atom = expanded_atoms[0]
@@ -1784,6 +1790,7 @@ class depgraph(object):
                        if not owners:
                                portage.writemsg(("\n\n!!! '%s' is not claimed " + \
                                        "by any package.\n") % lookup_owners[0], noiselevel=-1)
+                               self._dynamic_config._skip_restart = True
                                return 0, []
 
                        for cpv in owners:
@@ -4011,6 +4018,7 @@ class depgraph(object):
                        raise self._unknown_internal_error()
 
                if not self._validate_blockers():
+                       self._dynamic_config._skip_restart = True
                        raise self._unknown_internal_error()
 
                if self._dynamic_config._slot_collision_info:
@@ -4593,6 +4601,7 @@ class depgraph(object):
 
                        if not selected_nodes:
                                self._dynamic_config._circular_deps_for_display = mygraph
+                               self._dynamic_config._skip_restart = True
                                raise self._unknown_internal_error()
 
                        # At this point, we've succeeded in selecting one or more nodes, so
@@ -4701,6 +4710,7 @@ class depgraph(object):
                        self._dynamic_config._unsatisfied_blockers_for_display = unsolvable_blockers
                        self._dynamic_config._serialized_tasks_cache = retlist[:]
                        self._dynamic_config._scheduler_graph = scheduler_graph
+                       self._dynamic_config._skip_restart = True
                        raise self._unknown_internal_error()
 
                if self._dynamic_config._slot_collision_info and \