pungi-fedora/content-resolver-to-gather-source-json
Stephen Gallagher 3009dcdaaf
Add proper support for ELN-Extras
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
2022-07-18 12:45:21 -04:00

40 lines
1.2 KiB
Python
Executable File

#!/usr/bin/python
import requests
import json
VARIANTS = {
"BaseOS": "https://tiny.distro.builders/repo-split--view-eln--baseos.txt",
"AppStream": "https://tiny.distro.builders/repo-split--view-eln--appstream.txt",
"HighAvailability": "https://tiny.distro.builders/repo-split--view-eln--addon-ha.txt",
"NFV": "https://tiny.distro.builders/repo-split--view-eln--addon-nfv.txt",
"RT": "https://tiny.distro.builders/repo-split--view-eln--addon-rt.txt",
"ResilientStorage": "https://tiny.distro.builders/repo-split--view-eln--addon-rs.txt",
"SAP": "https://tiny.distro.builders/repo-split--view-eln--addon-sap.txt",
"SAPHANA": "https://tiny.distro.builders/repo-split--view-eln--addon-saphana.txt",
"CRB": None,
"Extras": None,
}
TREE_ARCHES = ["aarch64", "armhfp", "ppc64le", "s390x", "x86_64", "i386"]
ret = {}
for name, url in VARIANTS.items():
if url:
r = requests.get(url)
r.raise_for_status()
packages = r.text.split("\n")
else:
packages = []
ret[name] = {}
for arch in TREE_ARCHES:
ret[name][arch] = {}
for pkg in packages:
ret[name][arch][pkg] = [None]
with open("gather_source.json", "w") as f:
f.write(json.dumps(ret))