diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-05-22 22:45:21 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-05-22 22:45:21 +0000 |
commit | 8c6c83296bb1918a8b36e03c0e63b880d7de296b (patch) | |
tree | ad572d9573947c936d99d6d2b128a827c2bda20d | |
parent | 871e66b69027fc6727a0e8c4c7b7b4ac856d0880 (diff) | |
download | portage-8c6c83296bb1918a8b36e03c0e63b880d7de296b.tar.gz portage-8c6c83296bb1918a8b36e03c0e63b880d7de296b.tar.bz2 portage-8c6c83296bb1918a8b36e03c0e63b880d7de296b.zip |
Discard metadata from the Packages file if there's no MTIME attribute.
svn path=/main/trunk/; revision=6585
-rw-r--r-- | pym/portage/dbapi/bintree.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py index 5ec32d252..6e0800b08 100644 --- a/pym/portage/dbapi/bintree.py +++ b/pym/portage/dbapi/bintree.py @@ -456,17 +456,11 @@ class binarytree(object): update_pkgindex = True d = metadata.get(mycpv, {}) if d: - # Reuse metadata such as MD5, since we won't calculate - # MD5 here due to the performance hit. - mtime = d.get("MTIME") - if mtime: - # genpgkindex really should include the mtime and - # then this mtime check should be forced. - try: - if long(mtime) != long(s.st_mtime): - d.clear() - except ValueError: + try: + if long(d["MTIME"]) != long(s.st_mtime): d.clear() + except (KeyError, ValueError): + d.clear() if d: try: if long(d["SIZE"]) != long(s.st_size): |