Unverified Commit 4a1cf095 authored by Maxim Baz's avatar Maxim Baz
Browse files

keep `meta` object up-to-date for later DB reconstruction

parent 3cee7f0c
......@@ -183,13 +183,17 @@ async def main() -> int:
build_pkgmeta(pkgpath, pkginfo, pkgfiles)
)
# save meta info to json files
# save meta info to json files and update `meta` object
for repo, ps in pkgbases.items():
Path(metadir / repo).mkdir(exist_ok=True)
for pkgbase, pkgs in ps.items():
metafile = metadir / repo / f"{pkgbase}.json"
with metafile.open(mode="w", encoding="utf-8") as f:
json.dump(pkgs, f, ensure_ascii=False, indent=4, sort_keys=True)
meta[repo][pkgbase] = pkgs
# rebuild DB file using `meta` object
# TODO
return 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment