From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SFroB-0003IJ-QU for garchives@archives.gentoo.org; Thu, 05 Apr 2012 18:53:24 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5D3E9E0979; Thu, 5 Apr 2012 18:53:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 308ECE0979 for ; Thu, 5 Apr 2012 18:53:06 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 985AC1B403A for ; Thu, 5 Apr 2012 18:53:05 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 65619E5403 for ; Thu, 5 Apr 2012 18:53:04 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1333651971.001b0184cf72159a7d3c57501eb685205481ad3f.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/Scheduler.py pym/_emerge/actions.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 001b0184cf72159a7d3c57501eb685205481ad3f X-VCS-Branch: master Date: Thu, 5 Apr 2012 18:53:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 27347ed7-0de2-43c6-a9f5-66b16fd429f8 X-Archives-Hash: b7b2c70e84de0f89768aacf4be1cc9be commit: 001b0184cf72159a7d3c57501eb685205481ad3f Author: Zac Medico gentoo org> AuthorDate: Thu Apr 5 18:52:51 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Apr 5 18:52:51 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D001b0184 Scheduler: optimize action_uninstall --- pym/_emerge/Scheduler.py | 6 +++++- pym/_emerge/actions.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py index 8d6ab9f..5500acf 100644 --- a/pym/_emerge/Scheduler.py +++ b/pym/_emerge/Scheduler.py @@ -135,7 +135,8 @@ class Scheduler(PollScheduler): portage.exception.PortageException.__init__(self, value) =20 def __init__(self, settings, trees, mtimedb, myopts, - spinner, mergelist=3DNone, favorites=3DNone, graph_config=3DNone): + spinner, mergelist=3DNone, favorites=3DNone, graph_config=3DNone, + uninstall_only=3DFalse): PollScheduler.__init__(self) =20 if mergelist is not None: @@ -151,6 +152,7 @@ class Scheduler(PollScheduler): self._spinner =3D spinner self._mtimedb =3D mtimedb self._favorites =3D favorites + self._uninstall_only =3D uninstall_only self._args_set =3D InternalPackageSet(favorites, allow_repo=3DTrue) self._build_opts =3D self._build_opts_class() =20 @@ -327,6 +329,8 @@ class Scheduler(PollScheduler): self._blocker_db =3D {} dynamic_deps =3D self.myopts.get("--dynamic-deps", "y") !=3D "n" for root in self.trees: + if self._uninstall_only: + continue if graph_config is None: fake_vartree =3D FakeVartree(self.trees[root]["root_config"], pkg_cache=3Dself._pkg_cache, dynamic_deps=3Ddynamic_deps) diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 22c3e26..9c87120 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 =3D Scheduler(settings, trees, None, opts, - spinner) + spinner, uninstall_only=3DTrue) sched._background =3D sched._background_mode() sched._status_display.quiet =3D True =20