From: Zac Medico Date: Sun, 14 Oct 2007 18:29:30 +0000 (-0000) Subject: Add a note to clarify os.walk() behavior with respect X-Git-Tag: v2.2_pre1~625 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d847b5a97929fb8226c47a76d2472e2415d85034;p=portage.git Add a note to clarify os.walk() behavior with respect to symlinks to directories. svn path=/main/trunk/; revision=8124 --- diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index e2797b2fa..67e10b4e3 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -1731,6 +1731,9 @@ class dblink(object): 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):]) # Preserve old libs if they are still in use