summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorKrzysztof Pawlik <nelchael@gentoo.org>2012-05-04 23:47:27 -0700
committerZac Medico <zmedico@gentoo.org>2012-05-04 23:47:27 -0700
commit33545ea18e8816addb3c54bb26a0cc788b8512e6 (patch)
treed0cc3616908e23a43884af9b3f1d5a812b42d67a /pym
parente9ba65f66dbc59b89d6133b8a909f58fa41bf760 (diff)
downloadportage-33545ea18e8816addb3c54bb26a0cc788b8512e6.tar.gz
portage-33545ea18e8816addb3c54bb26a0cc788b8512e6.tar.bz2
portage-33545ea18e8816addb3c54bb26a0cc788b8512e6.zip
Support COLLISION_IGNORE_UNOWNED="*.pyc *.pyo"
This will fix bug #410691.
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/dbapi/vartree.py8
-rw-r--r--pym/portage/package/ebuild/_config/special_env_vars.py5
2 files changed, 11 insertions, 2 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index ec9f87c35..71b5d80e7 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -63,6 +63,7 @@ from _emerge.PollScheduler import PollScheduler
from _emerge.MiscFunctionsProcess import MiscFunctionsProcess
import errno
+import fnmatch
import gc
import grp
import io
@@ -3080,6 +3081,9 @@ class dblink(object):
portage.util.shlex_split(
self.settings.get("COLLISION_IGNORE", ""))])
+ unowned_ignore_patterns = self.settings.get(
+ "COLLISION_IGNORE_UNOWNED", "").split()
+
# For collisions with preserved libraries, the current package
# will assume ownership and the libraries will be unregistered.
if self.vartree.dbapi._plib_registry is None:
@@ -3188,6 +3192,10 @@ class dblink(object):
if f.startswith(myignore + os.path.sep):
stopmerge = False
break
+ for pattern in unowned_ignore_patterns:
+ if fnmatch.fnmatch(f, pattern):
+ stopmerge = False
+ break
if stopmerge:
collisions.append(f)
return collisions, symlink_collisions, plib_collisions
diff --git a/pym/portage/package/ebuild/_config/special_env_vars.py b/pym/portage/package/ebuild/_config/special_env_vars.py
index 132f8ebd8..8eac38034 100644
--- a/pym/portage/package/ebuild/_config/special_env_vars.py
+++ b/pym/portage/package/ebuild/_config/special_env_vars.py
@@ -134,8 +134,9 @@ environ_filter += [
# portage config variables and variables set directly by portage
environ_filter += [
"ACCEPT_CHOSTS", "ACCEPT_KEYWORDS", "ACCEPT_PROPERTIES", "AUTOCLEAN",
- "CLEAN_DELAY", "COLLISION_IGNORE", "CONFIG_PROTECT",
- "CONFIG_PROTECT_MASK", "EGENCACHE_DEFAULT_OPTS", "EMERGE_DEFAULT_OPTS",
+ "CLEAN_DELAY", "COLLISION_IGNORE", "COLLISION_IGNORE_UNOWNED",
+ "CONFIG_PROTECT", "CONFIG_PROTECT_MASK",
+ "EGENCACHE_DEFAULT_OPTS", "EMERGE_DEFAULT_OPTS",
"EMERGE_LOG_DIR",
"EMERGE_WARNING_DELAY",
"FETCHCOMMAND", "FETCHCOMMAND_FTP",