plugins: support for repo package sets

This adds support for specifing the package sets for repositories;
on the command line this can be done via `--repo-package-set` with
and argument of `;` separated package set names. This will result
in repo information being transported via dict instead of plain
strings. Thus the hub plugin's schema was modified accordingly.
Last but not least, the builder plugin now can decode these dicts
and setup the repos accordingly.
Test were added for plugins as well as the integration test changed
to use this new feature.
The first upstream commit that supports this feature is pinned.
This commit is contained in:
Christian Kellner 2022-02-14 17:13:06 +00:00 committed by Achilleas Koutsou
parent 5d2f6c6daa
commit f559c18079
7 changed files with 191 additions and 11 deletions

View file

@ -12,11 +12,13 @@ import subprocess
REPOS = {
"fedora": [
"http://download.fedoraproject.org/pub/fedora/linux/releases/$release/Everything/$arch/os"
{"url": "http://download.fedoraproject.org/pub/fedora/linux/releases/$release/Everything/$arch/os"}
],
"rhel": [
"http://download.devel.redhat.com/released/RHEL-8/$release/BaseOS/x86_64/os/",
"http://download.devel.redhat.com/released/RHEL-8/$release/AppStream/x86_64/os/",
{"url": "http://download.devel.redhat.com/released/RHEL-8/$release/BaseOS/x86_64/os/",
"package_sets": "blueprint; build; packages"},
{"url": "http://download.devel.redhat.com/released/RHEL-8/$release/AppStream/x86_64/os/",
"package_sets": "blueprint; build; packages"},
]
}
@ -98,9 +100,13 @@ class TestIntegration(unittest.TestCase):
repos = []
for repo in REPOS[name]:
tpl = string.Template(repo)
baseurl = repo["url"]
package_sets = repo.get("package_sets")
tpl = string.Template(baseurl)
url = tpl.safe_substitute({"release": release})
repos += ["--repo", url]
if package_sets:
repos += ["--repo-package-sets", package_sets]
package = f"{name.lower()}-guest"