tools: drop requirement for module_platform_id from request

The PLATFORM_ID got retired from fedora-43 [0] and it
seems like it was always kinda optional. So lets make
it optional for real to avoid failing to build fedora-43
images.

[0] https://fedoraproject.org/wiki/Changes/Drop_PLATFORM_ID
This commit is contained in:
Michael Vogt 2025-05-06 12:49:31 +02:00 committed by Simon de Vlieger
parent 59fe07a6ab
commit 549136b1b0
3 changed files with 6 additions and 10 deletions

View file

@ -20,7 +20,7 @@ class DNF(SolverBase):
def __init__(self, request, persistdir, cache_dir, license_index_path=None):
arch = request["arch"]
releasever = request.get("releasever")
module_platform_id = request["module_platform_id"]
module_platform_id = request.get("module_platform_id")
proxy = request.get("proxy")
arguments = request["arguments"]
@ -51,7 +51,8 @@ class DNF(SolverBase):
self.base.conf.zchunk = False
# Set the rest of the dnf configuration.
self.base.conf.module_platform_id = module_platform_id
if module_platform_id:
self.base.conf.module_platform_id = module_platform_id
self.base.conf.config_file_path = "/dev/null"
self.base.conf.persistdir = persistdir
self.base.conf.cachedir = cache_dir