From: Zac Medico Date: Thu, 5 Apr 2012 18:52:51 +0000 (-0700) Subject: Scheduler: optimize action_uninstall X-Git-Tag: v2.2.0_alpha100~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=001b0184cf72159a7d3c57501eb685205481ad3f;p=portage.git Scheduler: optimize action_uninstall --- diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py index 8d6ab9fb8..5500acfbb 100644 --- a/pym/_emerge/Scheduler.py +++ b/pym/_emerge/Scheduler.py @@ -135,7 +135,8 @@ class Scheduler(PollScheduler): portage.exception.PortageException.__init__(self, value) def __init__(self, settings, trees, mtimedb, myopts, - spinner, mergelist=None, favorites=None, graph_config=None): + spinner, mergelist=None, favorites=None, graph_config=None, + uninstall_only=False): PollScheduler.__init__(self) if mergelist is not None: @@ -151,6 +152,7 @@ class Scheduler(PollScheduler): self._spinner = spinner self._mtimedb = mtimedb self._favorites = favorites + self._uninstall_only = uninstall_only self._args_set = InternalPackageSet(favorites, allow_repo=True) self._build_opts = self._build_opts_class() @@ -327,6 +329,8 @@ class Scheduler(PollScheduler): self._blocker_db = {} dynamic_deps = self.myopts.get("--dynamic-deps", "y") != "n" for root in self.trees: + if self._uninstall_only: + continue if graph_config is None: fake_vartree = FakeVartree(self.trees[root]["root_config"], pkg_cache=self._pkg_cache, dynamic_deps=dynamic_deps) diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 22c3e265f..9c8712050 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -2657,7 +2657,7 @@ def action_uninstall(settings, trees, ldpath_mtimes, # redirection of ebuild phase output to logs as required for # options such as --quiet. sched = Scheduler(settings, trees, None, opts, - spinner) + spinner, uninstall_only=True) sched._background = sched._background_mode() sched._status_display.quiet = True