osbuild: convert ostree stage to inputs

Convert the `org.osbuild.ostree` stage to use inputs instead of
sources. In the format (version 1) loading code, convert the
stage to use an input based on the existing stage options.
This commit is contained in:
Christian Kellner 2021-02-01 18:43:18 +00:00
parent 17c6446a7c
commit 7ffae5669c
2 changed files with 24 additions and 14 deletions

View file

@ -96,6 +96,12 @@ def load_stage(description: Dict, index: Index, pipeline: Pipeline):
options = {"metadata": {"rpm.check_gpg": gpg}}
pkg = pkg["checksum"]
ip.add_reference(pkg, options)
elif stage.name == "org.osbuild.ostree":
info = index.get_module_info("Input", "org.osbuild.ostree")
ip = stage.add_input("commits", info, "org.osbuild.source")
commit, ref = opts["commit"], opts.get("ref")
options = {"ref": ref} if ref else None
ip.add_reference(commit, options)
def load_pipeline(description: Dict, index: Index, manifest: Manifest, n: int = 0) -> Pipeline: