summaryrefslogtreecommitdiffstats
path: root/pym/portage.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-17 22:43:17 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-17 22:43:17 +0000
commitca069e392d099d952a0888218c2ec53c0f31f28d (patch)
tree022903733fedb5b8d0a13a3bef084a1bcf2b1a49 /pym/portage.py
parent4193b7b43b26b8864b31ab5bbceddfb4145b4598 (diff)
downloadportage-ca069e392d099d952a0888218c2ec53c0f31f28d.tar.gz
portage-ca069e392d099d952a0888218c2ec53c0f31f28d.tar.bz2
portage-ca069e392d099d952a0888218c2ec53c0f31f28d.zip
In dblink.isowner() don't bother to stat the file when it's contained in the contents. (trunk r6865)
svn path=/main/branches/2.1.2/; revision=6866
Diffstat (limited to 'pym/portage.py')
-rw-r--r--pym/portage.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/pym/portage.py b/pym/portage.py
index dc54e8abb..955901a52 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -7270,15 +7270,18 @@ class dblink:
"""
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: