pungi-fedora/content-resolver-to-gather-source-json
Jan Kaluza 6dd2f696bd ELN: Try building Base container image.
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2020-09-16 09:19:17 +02: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,
"Everything": 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))