summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-10-24 10:39:57 +0000
committerZac Medico <zmedico@gentoo.org>2006-10-24 10:39:57 +0000
commit4da4882a8a061ae70f3a66213e55101369d7b11b (patch)
tree46dc645781372e7ca8af173b210bdad4f1e2261a
parent630ad8983eaa46ff1962454be001befb2120d1b9 (diff)
downloadportage-4da4882a8a061ae70f3a66213e55101369d7b11b.tar.gz
portage-4da4882a8a061ae70f3a66213e55101369d7b11b.tar.bz2
portage-4da4882a8a061ae70f3a66213e55101369d7b11b.zip
Enable recognition of _mtime_ that doesn't rely on cache mtime mangling.
svn path=/main/trunk/; revision=4808
-rw-r--r--pym/cache/flat_hash.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pym/cache/flat_hash.py b/pym/cache/flat_hash.py
index 722e9f184..d4c5930c7 100644
--- a/pym/cache/flat_hash.py
+++ b/pym/cache/flat_hash.py
@@ -26,7 +26,10 @@ class database(fs_template.FsBased):
myf = open(fp, "r")
try:
d = self._parse_data(myf, cpv)
- d["_mtime_"] = long(os.fstat(myf.fileno()).st_mtime)
+ if "_mtime_" not in d:
+ """Backward compatibility with old cache that uses mtime
+ mangling."""
+ d["_mtime_"] = long(os.fstat(myf.fileno()).st_mtime)
return d
finally:
myf.close()