From 9dbf3b909485e21ebb8fc48da3e4b9f511c38f93 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Wed, 26 Oct 2022 10:17:52 +0200 Subject: [PATCH] Import all projects before checking files - otherwise we end with 0s --- lib/importer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/importer.py b/lib/importer.py index 171bd60..0b612f1 100644 --- a/lib/importer.py +++ b/lib/importer.py @@ -159,7 +159,7 @@ class Importer: rev = DBRevision(row) linked_rev = rev.linked_rev(db) if not linked_rev: - logging.debug("No link", rev) + logging.debug(f"No link {rev}") continue cur.execute( """INSERT INTO linked_revs (revision_id, linked_id) @@ -301,6 +301,7 @@ class Importer: for number in DBRevision.requests_to_fetch(db, project, self.package): self.obs.request(number).import_into_db(db) + self.calculate_file_hashes(db) db.conn.commit() TreeBuilder(db).build(self.package)