Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
repod
Commits
4a1cf095
Unverified
Commit
4a1cf095
authored
Oct 09, 2019
by
Maxim Baz
Browse files
keep `meta` object up-to-date for later DB reconstruction
parent
3cee7f0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
dbscripts/db-update
View file @
4a1cf095
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment