diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-01-14 07:29:08 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-01-14 07:29:08 -0800 |
commit | 93b654199a32fc3df1299b030317720b9294b0c3 (patch) | |
tree | 8f29a7005ac7ff28f0132b7f2cb59c8f017a359a /pym/portage/dbapi/vartree.py | |
parent | c978b14d9a400c30616f27b63d8aa2d6d0522c0f (diff) | |
download | portage-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.py | 25 |
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 |