Add zkg_provides to --build-info.

This makes dependencies explicit that Zeek provides built-in for
`zkg`. It's in support of
https://github.com/zeek/package-manager/pull/157.

For now, `zkg_provides` contains the same data as `included_plugins`
plus an entry for `spicy-plugin`.
This commit is contained in:
Robin Sommer 2023-05-12 12:38:36 +02:00
parent 09a9a3e8f8
commit cc15948239
No known key found for this signature in database
GPG key ID: D8187293B3FFE5D0

View file

@ -9,6 +9,7 @@ Example usage:
""" """
import argparse import argparse
import copy
import json import json
import logging import logging
import pathlib import pathlib
@ -207,6 +208,11 @@ def main():
info["included_plugins"] = included_plugins_info info["included_plugins"] = included_plugins_info
zkg_provides_info = copy.deepcopy(included_plugins_info)
# Hardcode the former spicy-plugin so that zkg knows Spicy is available.
zkg_provides_info.append({"name": "spicy-plugin", "version": info["version"].split("-")[0]})
info["zkg_provides"] = zkg_provides_info
json_str = json.dumps(info, indent=2, sort_keys=True) json_str = json.dumps(info, indent=2, sort_keys=True)
print(json_str) print(json_str)