From: Zac Medico Date: Fri, 29 Sep 2006 21:36:34 +0000 (-0000) Subject: For bug #149412, add a COLLISION_IGNORE user config option that behaves similar to... X-Git-Tag: v2.1.2~741 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=26738ed2d7ff55ee2f116cc1f29e2538caa2142a;p=portage.git 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 --- 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"