summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-06-23 01:24:25 +0000
committerZac Medico <zmedico@gentoo.org>2008-06-23 01:24:25 +0000
commit3f3228b5a57ec4c362d6e09672ae1f90b094ff9a (patch)
treec9ffbae94bfab5e47aa81a7988d8a0e6871f6cbf
parent98cf6467bc43c2167adbcc6a51977a392c07772c (diff)
downloadportage-3f3228b5a57ec4c362d6e09672ae1f90b094ff9a.tar.gz
portage-3f3228b5a57ec4c362d6e09672ae1f90b094ff9a.tar.bz2
portage-3f3228b5a57ec4c362d6e09672ae1f90b094ff9a.zip
Bug #228977 - Protect against possible infinite loop in
dblink._preserve_libs(). svn path=/main/trunk/; revision=10762
-rw-r--r--pym/portage/dbapi/vartree.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 68621c576..f71a20794 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -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)))