Never use listdir with both recursion=True and followSymlinks=True since it circular...
authorZac Medico <zmedico@gentoo.org>
Sun, 18 Mar 2007 07:40:11 +0000 (07:40 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 18 Mar 2007 07:40:11 +0000 (07:40 -0000)
svn path=/main/trunk/; revision=6242

pym/portage/dbapi/vartree.py

index e658d63787ad045e5feb252189d7ed0f713e1bf7..7573973641e6fc4b1f4506f4afef1914524c5dbe 100644 (file)
@@ -1423,14 +1423,14 @@ class dblink(object):
 
                # Preserve old libs if they are still in use
                if slot_matches and "preserve-libs" in self.settings.features:
-                       myfilelist = listdir(srcroot, recursive=1, filesonly=1, followSymlinks=True)
+                       myfilelist = listdir(srcroot, recursive=1, filesonly=1, followSymlinks=False)
                        mylinklist = filter(os.path.islink, listdir(srcroot, recursive=1, filesonly=0, followSymlinks=False))
                        self._preserve_libs(srcroot, destroot, myfilelist+mylinklist)
 
                # check for package collisions
                if "collision-protect" in self.settings.features:
                        if myfilelist == None:
-                               myfilelist = listdir(srcroot, recursive=1, filesonly=1, followSymlinks=True)
+                               myfilelist = listdir(srcroot, recursive=1, filesonly=1, followSymlinks=False)
                        if mylinklist == None:
                                mylinklist = filter(os.path.islink, listdir(srcroot, recursive=1, filesonly=0, followSymlinks=False))
                        self._collision_protect(srcroot, destroot, otherversions, myfilelist+mylinklist, mylinklist)