Bug #228977 - Protect against possible infinite loop in
authorZac Medico <zmedico@gentoo.org>
Mon, 23 Jun 2008 01:24:25 +0000 (01:24 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 23 Jun 2008 01:24:25 +0000 (01:24 -0000)
dblink._preserve_libs().

svn path=/main/trunk/; revision=10762

pym/portage/dbapi/vartree.py

index 68621c5764861b92ecc1a4bba43a012a3ca7a8ef..f71a207940c572fab2e7798491b1d4afb42f1b01 100644 (file)
@@ -2068,8 +2068,9 @@ class dblink(object):
                                os.symlink(linktarget, os.path.join(srcroot, x.lstrip(os.sep)))
                                if linktarget[0] != os.sep:
                                        linktarget = os.path.join(os.path.dirname(x), linktarget)
-                               candidates.add(linktarget)
-                               candidates_stack.append(linktarget)
+                               if linktarget not in candidates:
+                                       candidates.add(linktarget)
+                                       candidates_stack.append(linktarget)
                        else:
                                shutil.copy2(os.path.join(destroot, x.lstrip(os.sep)),
                                        os.path.join(srcroot, x.lstrip(os.sep)))