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:
parent
59fe07a6ab
commit
549136b1b0
3 changed files with 6 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class DNF5(SolverBase):
|
|||
def __init__(self, request, persistdir, cachedir, 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"]
|
||||
|
|
@ -115,7 +115,8 @@ class DNF5(SolverBase):
|
|||
conf.zchunk = False
|
||||
|
||||
# Set the rest of the dnf configuration.
|
||||
conf.module_platform_id = module_platform_id
|
||||
if module_platform_id:
|
||||
conf.module_platform_id = module_platform_id
|
||||
conf.config_file_path = "/dev/null"
|
||||
conf.persistdir = persistdir
|
||||
conf.cachedir = cachedir
|
||||
|
|
|
|||
|
|
@ -141,12 +141,6 @@ def validate_request(request):
|
|||
"reason": "no 'arch' specified"
|
||||
}
|
||||
|
||||
if not request.get("module_platform_id"):
|
||||
return {
|
||||
"kind": "InvalidRequest",
|
||||
"reason": "no 'module_platform_id' specified"
|
||||
}
|
||||
|
||||
if not request.get("releasever"):
|
||||
return {
|
||||
"kind": "InvalidRequest",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue