From: Zac Medico Date: Tue, 24 Oct 2006 10:39:57 +0000 (-0000) Subject: Enable recognition of _mtime_ that doesn't rely on cache mtime mangling. X-Git-Tag: v2.1.2~558 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4da4882a8a061ae70f3a66213e55101369d7b11b;p=portage.git Enable recognition of _mtime_ that doesn't rely on cache mtime mangling. svn path=/main/trunk/; revision=4808 --- 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()