From: Zac Medico Date: Mon, 23 Jun 2008 01:24:25 +0000 (-0000) Subject: Bug #228977 - Protect against possible infinite loop in X-Git-Tag: v2.2_rc2~353 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3f3228b5a57ec4c362d6e09672ae1f90b094ff9a;p=portage.git Bug #228977 - Protect against possible infinite loop in dblink._preserve_libs(). svn path=/main/trunk/; revision=10762 --- 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)))