fix(mkpkglists): improve package meta archive

The SQL logic in this file for package metadata now exactly
reflects RPC's search logic, without searching for specific
packages.

Two command line arguments are available:

    --extended | Include License, Keywords, Groups, relations
                 and dependencies.

When --extended is passed, the script will create a
packages-meta-ext-v1.json.gz, configured via packagesmetaextfile.

Archive JSON is in the following format: line-separated package objects
enclosed in a list:

    [
    {...},
    {...},
    {...}
    ]

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-10-31 16:52:30 -07:00
parent f606140050
commit f3f662c696
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
4 changed files with 255 additions and 24 deletions

View file

@ -37,6 +37,7 @@ enable-maintenance = 0
maintenance-exceptions = 127.0.0.1
commit_uri = https://aur.archlinux.org/cgit/aur.git/log/?h=%s&id=%s
localedir = $TOPLEVEL/web/locale/
snapshot_uri = /cgit/aur.git/snapshot/%s.tar.gz
[notifications]
notify-cmd = $NOTIFY
@ -68,6 +69,7 @@ server = file://$(pwd)/remote/
[mkpkglists]
packagesfile = packages.gz
packagesmetafile = packages-meta-v1.json.gz
packagesmetaextfile = packages-meta-ext-v1.json.gz
pkgbasefile = pkgbase.gz
userfile = users.gz
EOF