summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-03-18 07:40:11 +0000
committerZac Medico <zmedico@gentoo.org>2007-03-18 07:40:11 +0000
commitfe27c41995ff9c58eb95d015bbcd19d2d2b44039 (patch)
treea2e3d3a8913b0fc3d4d49c72aa3e108ca34df28f
parent393ed1e409b2f295a47f133ce4d2d920fc15770a (diff)
downloadportage-fe27c41995ff9c58eb95d015bbcd19d2d2b44039.tar.gz
portage-fe27c41995ff9c58eb95d015bbcd19d2d2b44039.tar.bz2
portage-fe27c41995ff9c58eb95d015bbcd19d2d2b44039.zip
Never use listdir with both recursion=True and followSymlinks=True since it circular symlinks will lead to endless recursion loops. Thanks to Tobias Hahn <tobhahn@web.de> for this patch.
svn path=/main/trunk/; revision=6242
-rw-r--r--pym/portage/dbapi/vartree.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index e658d6378..757397364 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -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)