summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-09-09 22:00:57 +0000
committerZac Medico <zmedico@gentoo.org>2006-09-09 22:00:57 +0000
commit159d8a41a2137fde5e3cb8e8d8e6f8bb79c3bf90 (patch)
tree3c1539c9e18316bd6ece052d688fc0c4df158f96
parent86e0be91701f3ae7f0697cef4cd9e3e08fc63840 (diff)
downloadportage-159d8a41a2137fde5e3cb8e8d8e6f8bb79c3bf90.tar.gz
portage-159d8a41a2137fde5e3cb8e8d8e6f8bb79c3bf90.tar.bz2
portage-159d8a41a2137fde5e3cb8e8d8e6f8bb79c3bf90.zip
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
-rw-r--r--pym/portage.py5
1 files changed, 4 insertions, 1 deletions
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