aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-01-14 07:29:08 -0800
committerZac Medico <zmedico@gentoo.org>2012-01-14 07:29:08 -0800
commit93b654199a32fc3df1299b030317720b9294b0c3 (patch)
tree8f29a7005ac7ff28f0132b7f2cb59c8f017a359a /pym/portage/dbapi/vartree.py
parentdyn_install: skip copy if possible (diff)
downloadportage-93b654199a32fc3df1299b030317720b9294b0c3.tar.gz
portage-93b654199a32fc3df1299b030317720b9294b0c3.tar.bz2
portage-93b654199a32fc3df1299b030317720b9294b0c3.zip
Apply INSTALL_MASK prior to collision-protect.
It may be useful to avoid collisions in some scenarios.
Diffstat (limited to 'pym/portage/dbapi/vartree.py')
-rw-r--r--pym/portage/dbapi/vartree.py25
1 files changed, 17 insertions, 8 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index af70ec3fe..5bb4fa404 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
- # check for package collisions
- blockers = self._blockers
- if blockers is None:
- blockers = []
- collisions, symlink_collisions, plib_collisions = \
- 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=self.settings, cleanup=cleanup)
+ if self.settings.get("INSTALL_MASK"):
+ # Apply INSTALL_MASK before collision-protect, since it may
+ # be useful to avoid collisions in some scenarios.
+ phase = MiscFunctionsProcess(background=False,
+ commands=["preinst_mask"], phase="preinst",
+ scheduler=self._scheduler, settings=self.settings)
+ phase.start()
+ phase.wait()
+
+ # check for package collisions
+ blockers = self._blockers
+ if blockers is None:
+ blockers = []
+ collisions, symlink_collisions, plib_collisions = \
+ self._collision_protect(srcroot, destroot,
+ others_in_slot + blockers, myfilelist, mylinklist)
+
if collisions:
collision_protect = "collision-protect" in self.settings.features
protect_owned = "protect-owned" in self.settings.features