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 1RRBKZ-0002nN-Kh for garchives@archives.gentoo.org; Thu, 17 Nov 2011 23:25:19 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9ACD921C021; Thu, 17 Nov 2011 23:25:12 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 6725721C021 for ; Thu, 17 Nov 2011 23:25:12 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B1D051B4029 for ; Thu, 17 Nov 2011 23:25:11 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 26B5780042 for ; Thu, 17 Nov 2011 23:25:11 +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: Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/, pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/Scheduler.py pym/portage/package/ebuild/doebuild.py X-VCS-Directories: pym/portage/package/ebuild/ pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: d032f01ae3333fa5383aec25878b0eadd95f208b Date: Thu, 17 Nov 2011 23:25:11 +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: ca897fbb-1799-4364-9e08-f507584ba4e4 X-Archives-Hash: 01d94a0fdbf3c69d9a771726ac9acf60 commit: d032f01ae3333fa5383aec25878b0eadd95f208b Author: Zac Medico gentoo org> AuthorDate: Thu Nov 17 23:25:03 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Nov 17 23:25:03 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Dd032f01a Tweak the last commit. --- pym/_emerge/Scheduler.py | 13 ++----------- pym/portage/package/ebuild/doebuild.py | 7 +++++++ 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py index 393eeb6..ad1a944 100644 --- a/pym/_emerge/Scheduler.py +++ b/pym/_emerge/Scheduler.py @@ -76,7 +76,7 @@ class Scheduler(PollScheduler): frozenset(["--pretend", "--fetchonly", "--fetch-all-uri"]) =20 - _opts_no_self_reinstall =3D frozenset(["--buildpkgonly", + _opts_no_self_update =3D frozenset(["--buildpkgonly", "--fetchonly", "--fetch-all-uri", "--pretend"]) =20 class _iface_class(SlotObject): @@ -288,17 +288,8 @@ class Scheduler(PollScheduler): self._running_root, installed=3DTrue) =20 def _handle_self_update(self): - """ - If portage is updating itself, create temporary - copies of PORTAGE_BIN_PATH and PORTAGE_PYM_PATH in order - to avoid relying on the new versions which may be - incompatible. Register an atexit hook to clean up the - temporary directories. Pre-load elog modules here since - we won't be able to later if they get unmerged (happens - when namespace changes). - """ =20 - if self._opts_no_self_reinstall.intersection(self.myopts): + if self._opts_no_self_update.intersection(self.myopts): return =20 for x in self._mergelist: diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package= /ebuild/doebuild.py index 49d3e89..9e71cfc 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -2017,6 +2017,13 @@ def _merge_unicode_error(errors): return lines =20 def _prepare_self_update(settings): + """ + Call this when portage is updating itself, in order to create + temporary copies of PORTAGE_BIN_PATH and PORTAGE_PYM_PATH, since + the new versions may be incompatible. An atexit hook will + automatically clean up the temporary copies. + """ + # Load lazily referenced portage submodules into memory, # so imports won't fail during portage upgrade/downgrade. _preload_elog_modules(settings)