diff options
Diffstat (limited to 'dbgenerator/core.py')
-rw-r--r-- | dbgenerator/core.py | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/dbgenerator/core.py b/dbgenerator/core.py index 2dc048d..d96a042 100644 --- a/dbgenerator/core.py +++ b/dbgenerator/core.py @@ -60,13 +60,16 @@ def process_metadata(backend, database, cat, pn): full_changelog = backend.get_changelog((cat, pn)) changelog = latest_changelog(full_changelog) - (mtime, sha1) = backend.get_changelog_meta((cat, pn)) + (changelog_mtime, changelog_sha1) = backend.get_changelog_meta((cat, pn)) + (manifest_mtime, manifest_sha1) = backend.get_manifest_meta((cat, pn)) #store metadata database.add_metadata(cat, pn, description, homepage, pkglicense, changelog, - mtime, sha1) + changelog_mtime, changelog_sha1, + manifest_mtime, manifest_sha1 + ) def cleanup_database(database, old_cps, old_cpvs): for cpi in old_cps: @@ -103,10 +106,18 @@ def main(): # Check for the changelog changing (changelog_mtime, changelog_sha1) = \ backend.get_changelog_meta((cat, pn)) + (manifest_mtime, manifest_sha1) = \ + backend.get_manifest_meta((cat, pn)) (dummy, changelog_mtime_old, changelog_sha1_old) = \ database.get_changelog(cat, pn) - if changelog_mtime == changelog_mtime_old and \ - changelog_sha1 == changelog_sha1_old: + (manifest_mtime_old, manifest_sha1_old) = \ + database.get_manifest(cat, pn) + if (manifest_mtime_old <= 0 and \ + changelog_mtime == changelog_mtime_old and \ + changelog_sha1 == changelog_sha1_old) \ + or (False and manifest_mtime_old > 0 and \ + manifest_mtime == manifest_mtime_old and \ + manifest_sha1 == manifest_sha1_old): if cpi and cpi in old_cps: old_cps.discard(cpi) old_cpvs.difference_update(database.child_cpv(cpi)) |