From 3f3228b5a57ec4c362d6e09672ae1f90b094ff9a Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 23 Jun 2008 01:24:25 +0000 Subject: [PATCH] Bug #228977 - Protect against possible infinite loop in dblink._preserve_libs(). svn path=/main/trunk/; revision=10762 --- pym/portage/dbapi/vartree.py | 5 +++-- 1 file 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))) -- 2.26.2