Add support for using librepo to download packages

Using a metalink or mirrorlist along with the package paths and
checksums allows them to be reliably downloaded even when mirrors are
not all in sync. It will retry with a new mirror until it succeeds, or
has tried all of the mirrors.
This commit is contained in:
Brian C. Lane 2023-05-02 14:23:30 -07:00 committed by Simon de Vlieger
parent 1eb8138ab5
commit 28e74f6c9b
5 changed files with 258 additions and 0 deletions

View file

@ -133,6 +133,8 @@ def load_source(name: str, description: Dict, index: Index, manifest: Manifest):
items = description["urls"]
elif name == "org.osbuild.ostree":
items = description["commits"]
elif name == "org.osbuild.librepo":
items = description["items"]
else:
raise ValueError(f"Unknown source type: {name}")