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 1Rm5Yi-0007td-9p for garchives@archives.gentoo.org; Sat, 14 Jan 2012 15:30:20 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9A60CE0684; Sat, 14 Jan 2012 15:30:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 50349E0684 for ; Sat, 14 Jan 2012 15:30:11 +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 B5C461B4028 for ; Sat, 14 Jan 2012 15:30:10 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id EEE6E80044 for ; Sat, 14 Jan 2012 15:30:09 +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: <93b654199a32fc3df1299b030317720b9294b0c3.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/, pym/portage/dbapi/, pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/MiscFunctionsProcess.py pym/portage/dbapi/vartree.py pym/portage/package/ebuild/doebuild.py X-VCS-Directories: pym/portage/package/ebuild/ pym/portage/dbapi/ pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 93b654199a32fc3df1299b030317720b9294b0c3 Date: Sat, 14 Jan 2012 15:30:09 +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: afd00fd5-214a-43f1-91cc-d0da86fb1efe X-Archives-Hash: a2fdf106af0e279a819bb5282c205a61 commit: 93b654199a32fc3df1299b030317720b9294b0c3 Author: Zac Medico gentoo org> AuthorDate: Sat Jan 14 15:29:08 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat Jan 14 15:29:08 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D93b65419 Apply INSTALL_MASK prior to collision-protect. It may be useful to avoid collisions in some scenarios. --- pym/_emerge/MiscFunctionsProcess.py | 10 ++++++++-- pym/portage/dbapi/vartree.py | 25 +++++++++++++++++-------- pym/portage/package/ebuild/doebuild.py | 2 +- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/pym/_emerge/MiscFunctionsProcess.py b/pym/_emerge/MiscFuncti= onsProcess.py index ce0ab14..afa44fb 100644 --- a/pym/_emerge/MiscFunctionsProcess.py +++ b/pym/_emerge/MiscFunctionsProcess.py @@ -29,5 +29,11 @@ class MiscFunctionsProcess(AbstractEbuildProcess): AbstractEbuildProcess._start(self) =20 def _spawn(self, args, **kwargs): - self.settings.pop("EBUILD_PHASE", None) - return spawn(" ".join(args), self.settings, **kwargs) + # Temporarily unset EBUILD_PHASE so that bashrc code doesn't + # think this is a real phase. + phase_backup =3D self.settings.pop("EBUILD_PHASE", None) + try: + return spawn(" ".join(args), self.settings, **kwargs) + finally: + if phase_backup is not None: + self.settings["EBUILD_PHASE"] =3D phase_backup diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index af70ec3..5bb4fa4 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -3506,14 +3506,6 @@ class dblink(object): if installed_files: return 1 =20 - # check for package collisions - blockers =3D self._blockers - if blockers is None: - blockers =3D [] - collisions, symlink_collisions, plib_collisions =3D \ - self._collision_protect(srcroot, destroot, - others_in_slot + blockers, myfilelist, mylinklist) - # Make sure the ebuild environment is initialized and that ${T}/elog # exists for logging of collision-protect eerror messages. if myebuild is None: @@ -3525,6 +3517,23 @@ class dblink(object): for other in others_in_slot]) prepare_build_dirs(settings=3Dself.settings, cleanup=3Dcleanup) =20 + if self.settings.get("INSTALL_MASK"): + # Apply INSTALL_MASK before collision-protect, since it may + # be useful to avoid collisions in some scenarios. + phase =3D MiscFunctionsProcess(background=3DFalse, + commands=3D["preinst_mask"], phase=3D"preinst", + scheduler=3Dself._scheduler, settings=3Dself.settings) + phase.start() + phase.wait() + + # check for package collisions + blockers =3D self._blockers + if blockers is None: + blockers =3D [] + collisions, symlink_collisions, plib_collisions =3D \ + self._collision_protect(srcroot, destroot, + others_in_slot + blockers, myfilelist, mylinklist) + if collisions: collision_protect =3D "collision-protect" in self.settings.features protect_owned =3D "protect-owned" in self.settings.features diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package= /ebuild/doebuild.py index cb7cc1c..c52ab31 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -1487,7 +1487,7 @@ _post_phase_cmds =3D { "preinst_sfperms", "preinst_selinux_labels", "preinst_suid_scan", - "preinst_mask"] + ] } =20 def _post_phase_userpriv_perms(mysettings):