stages/dnf: don't name the repositories

The names carry no information, and do not affect the produced image.
Generate them instead.

Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
Tom Gundersen 2019-09-29 16:10:27 +02:00 committed by Lars Karlitski
parent 4ba125e393
commit 840bfd580c
9 changed files with 31 additions and 31 deletions

View file

@ -62,8 +62,8 @@ def main(tree, options):
weak_deps = options.get("install_weak_deps", True)
with open("/tmp/dnf.conf", "w") as conf:
for repoid, repo in repos.items():
write_repofile(conf, repoid, repo)
for repoid, repo in enumerate(repos):
write_repofile(conf, f"repo{repoid}", repo)
script = f"""
set -e
@ -105,10 +105,10 @@ def main(tree, options):
subprocess.run(cmd, check=True)
# verify metadata checksum
for repoid, repo in repos.items():
for repoid, repo in enumerate(repos):
algorithm, checksum = repo["checksum"].split(":")
assert algorithm == "sha256"
cachedir = dnf_cachedir(repoid, repo, releasever, basearch)
cachedir = dnf_cachedir(f"repo{repoid}", repo, releasever, basearch)
with open(f"{tree}/var/cache/dnf/{cachedir}/repodata/repomd.xml", "rb") as f:
repomd = f.read()
assert hashlib.sha256(repomd).hexdigest() == checksum