diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-09-29 21:36:34 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-09-29 21:36:34 +0000 |
commit | 26738ed2d7ff55ee2f116cc1f29e2538caa2142a (patch) | |
tree | 71219ed5b61969e089d98bda4c0e074ef1b2f778 | |
parent | ff20fd50202dacf25b9db9b615aa40cb7b64f330 (diff) | |
download | portage-26738ed2d7ff55ee2f116cc1f29e2538caa2142a.tar.gz portage-26738ed2d7ff55ee2f116cc1f29e2538caa2142a.tar.bz2 portage-26738ed2d7ff55ee2f116cc1f29e2538caa2142a.zip |
For bug #149412, add a COLLISION_IGNORE user config option that behaves similar to CONFIG_PROTECT_MASK, but for collision-protect.
svn path=/main/trunk/; revision=4562
-rw-r--r-- | pym/portage.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pym/portage.py b/pym/portage.py index d13cac679..5103309cc 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -5985,6 +5985,8 @@ class dblink: # check for package collisions if "collision-protect" in self.settings.features: + collision_ignore = set([normalize_path(myignore) for myignore in \ + self.settings.get("COLLISION_IGNORE", "").split()]) myfilelist = listdir(srcroot, recursive=1, filesonly=1, followSymlinks=False) # the linkcheck only works if we are in srcroot @@ -6035,6 +6037,14 @@ class dblink: if not isowned: print "existing file "+f+" is not owned by this package" stopmerge=True + if collision_ignore: + if f in collision_ignore: + stopmerge = False + else: + for myignore in collision_ignore: + if f.startswith(myignore + os.path.sep): + stopmerge = False + break print green("*")+" spent "+str(time.time()-starttime)+" seconds checking for file collisions" if stopmerge: print red("*")+" This package is blocked because it wants to overwrite" |