diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-06-23 01:24:25 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-06-23 01:24:25 +0000 |
commit | 3f3228b5a57ec4c362d6e09672ae1f90b094ff9a (patch) | |
tree | c9ffbae94bfab5e47aa81a7988d8a0e6871f6cbf | |
parent | 98cf6467bc43c2167adbcc6a51977a392c07772c (diff) | |
download | portage-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.py | 5 |
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))) |