From d847b5a97929fb8226c47a76d2472e2415d85034 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 14 Oct 2007 18:29:30 +0000 Subject: [PATCH] Add a note to clarify os.walk() behavior with respect to symlinks to directories. svn path=/main/trunk/; revision=8124 --- pym/portage/dbapi/vartree.py | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.26.2