From: Zac Medico Date: Sat, 9 Sep 2006 22:00:57 +0000 (-0000) Subject: In dblink.isowner(), correct the logic to test the path itself (via lstat) rather... X-Git-Tag: v2.1.1-r1~91 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=159d8a41a2137fde5e3cb8e8d8e6f8bb79c3bf90;p=portage.git In dblink.isowner(), correct the logic to test the path itself (via lstat) rather than the referant in the case of symlinks. svn path=/main/trunk/; revision=4430 --- diff --git a/pym/portage.py b/pym/portage.py index fa2ac9cdb..a39e16ee4 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -5855,8 +5855,11 @@ class dblink: (for this or a previous version)""" destfile = normalize_path( os.path.join(destroot, filename.lstrip(os.path.sep))) - if not os.path.exists(destfile): + try: + os.lstat(destfile) # lexists requires >=python-2.4 + except OSError: return True + pkgfiles = self.getcontents() if pkgfiles and filename in pkgfiles: return True