Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-commits
Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-commits@g.o
From: "Zac Medico" <zmedico@g.o>
Subject: proj/portage:master commit in: man/, pym/portage/dbapi/, pym/portage/package/ebuild/_config/, cnf/
Date: Sat, 5 May 2012 06:47:55 +0000 (UTC)
commit:     33545ea18e8816addb3c54bb26a0cc788b8512e6
Author:     Krzysztof Pawlik <nelchael <AT> gentoo <DOT> org>
AuthorDate: Sat May  5 06:47:27 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat May  5 06:47:27 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=33545ea1

Support COLLISION_IGNORE_UNOWNED="*.pyc *.pyo"

This will fix bug #410691.

---
 cnf/make.globals                                   |    5 +++++
 man/make.conf.5                                    |    7 +++++++
 pym/portage/dbapi/vartree.py                       |    8 ++++++++
 .../package/ebuild/_config/special_env_vars.py     |    5 +++--
 4 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/cnf/make.globals b/cnf/make.globals
index 0f6f541..5f536c3 100644
--- a/cnf/make.globals
+++ b/cnf/make.globals
@@ -61,6 +61,11 @@ FEATURES="assume-digests binpkg-logs distlocks ebuild-locks
 # FEATURES=protect-owned to operate smoothly in all cases.
 COLLISION_IGNORE="/lib/modules"
 
+# Ignore file collisions for unowned *.pyo and *.pyc files, this helps during
+# transition from compiling python modules in live file system to compiling
+# them in src_install() function.
+COLLISION_IGNORE_UNOWNED="*.pyc *.pyo"
+
 # Enable preserve-libs for testing with portage versions that support it.
 # This setting is commented out for portage versions that don't support it.
 FEATURES="${FEATURES} preserve-libs"

diff --git a/man/make.conf.5 b/man/make.conf.5
index e8777c8..7b1d4c0 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -134,6 +134,13 @@ This variable allows the user to disable \fIcollision\-protect\fR and
 .br
 Defaults to /lib/modules.
 .TP
+\fBCOLLISION_IGNORE_UNOWNED\fR = \fI[space delimited list of shell patterns]\fR
+This variable allows the user to disable \fIcollision\-protect\fR and
+\fIprotect\-owned\fR for specific shell patterns for files that are
+not owned by any packages.
+.br
+Defaults to *.pyc and *.pyo patterns.
+.TP
 \fBCONFIG_PROTECT\fR = \fI[space delimited list of files and/or directories]\fR
 All files and/or directories that are defined here will have "config file protection"
 enabled for them. See the \fBCONFIGURATION FILES\fR section

diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index ec9f87c..71b5d80 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 132f8eb..8eac380 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",


Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
gentoo-x86 commit in xfce-base/garcon: garcon-0.1.12.ebuild ChangeLog garcon-0.1.9.ebuild garcon-0.2.0.ebuild
Next by thread:
proj/portage:master commit in: man/, pym/portage/dbapi/, pym/portage/package/ebuild/_config/, cnf/
Previous by date:
gentoo commit in xml/htdocs/proj/en/perl: outdated-cpan-packages-perl-experimental.xml
Next by date:
gentoo-x86 commit in xfce-base/xfconf: xfconf-4.8.1.ebuild ChangeLog xfconf-4.10.0.ebuild xfconf-4.9.1.ebuild


Updated Jun 26, 2012

Summary: Archive of the gentoo-commits mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.