From 159d8a41a2137fde5e3cb8e8d8e6f8bb79c3bf90 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 9 Sep 2006 22:00:57 +0000 Subject: 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 --- pym/portage.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pym') 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 -- cgit v1.2.3-1-g7c22