summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-17 22:42:52 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-17 22:42:52 +0000
commit6b2ce92454d61576b9821b979d13c977d59fab36 (patch)
treea8c782387f27f6200ba69eb5b2ec34037b1b0f8d
parent46faef9797ae9c39328a1c4268e9eec34d010a11 (diff)
downloadportage-6b2ce92454d61576b9821b979d13c977d59fab36.tar.gz
portage-6b2ce92454d61576b9821b979d13c977d59fab36.tar.bz2
portage-6b2ce92454d61576b9821b979d13c977d59fab36.zip
In dblink.isowner() don't bother to stat the file when it's contained in the contents.
svn path=/main/trunk/; revision=6865
-rw-r--r--pym/portage/dbapi/vartree.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 3920fd096..dcc673c79 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -1305,15 +1305,18 @@ class dblink(object):
"""
destfile = normalize_path(
os.path.join(destroot, filename.lstrip(os.path.sep)))
- try:
- mylstat = os.lstat(destfile)
- except (OSError, IOError):
- return True
pkgfiles = self.getcontents()
if pkgfiles and destfile in pkgfiles:
return True
if pkgfiles:
+ try:
+ mylstat = os.lstat(destfile)
+ except EnvironmentError, e:
+ if e.errno != errno.ENOENT:
+ raise
+ del e
+ return True
if self._contents_inodes is None:
self._contents_inodes = set()
for x in pkgfiles: