diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-10-15 18:46:12 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-10-15 18:46:12 +0000 |
commit | d89a7851ef6c78dc1f5f05c4e37627ecd347c930 (patch) | |
tree | d28734eb0a6a42c75f96fb1c1a8d25b05818278f /pym | |
parent | 9ef98bcda501b139e2123dfc54fc9d35a4e819ee (diff) | |
download | portage-d89a7851ef6c78dc1f5f05c4e37627ecd347c930.tar.gz portage-d89a7851ef6c78dc1f5f05c4e37627ecd347c930.tar.bz2 portage-d89a7851ef6c78dc1f5f05c4e37627ecd347c930.zip |
Remove the checks for files in symlinked directories
from the collision protect code since it hasn't been
needed ever since the followSymlinks parameter was
disabled for portage.listdir() calls in order to
prevent infinite recursion loops. (trunk r8120:8124)
svn path=/main/branches/2.1.2/; revision=8131
Diffstat (limited to 'pym')
-rw-r--r-- | pym/portage.py | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/pym/portage.py b/pym/portage.py index bd13d69fc..7245151b1 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -7885,18 +7885,18 @@ class dblink: if stat.S_ISREG(file_mode): myfilelist.append(file_path[len(srcroot):]) elif stat.S_ISLNK(file_mode): + # Note: os.walk puts symlinks to directories in the "dirs" + # list and it does not traverse them since that could lead + # to an infinite recursion loop. mylinklist.append(file_path[len(srcroot):]) myfilelist.extend(mylinklist) - mysymlinks = mylinklist del mylinklist # check for package collisions if True: collision_ignore = set([normalize_path(myignore) for myignore in \ self.settings.get("COLLISION_IGNORE", "").split()]) - mysymlinked_directories = [s + os.path.sep for s in mysymlinks] - del mysymlinks stopmerge=False starttime=time.time() @@ -7906,15 +7906,6 @@ class dblink: os.path.sep print green("*")+" checking "+str(len(myfilelist))+" files for package collisions" for f in myfilelist: - nocheck = False - # listdir isn't intelligent enough to exclude symlinked dirs, - # so we have to do it ourself - for s in mysymlinked_directories: - if f.startswith(s): - nocheck = True - break - if nocheck: - continue i=i+1 if i % 1000 == 0: print str(i)+" files checked ..." |