tools/osbuild-depsolve-dnf(5): support proxy

This commit is contained in:
Sanne Raymaekers 2024-04-10 19:15:17 +02:00
parent 58993d8321
commit f8299cf57d
2 changed files with 6 additions and 0 deletions

View file

@ -27,6 +27,7 @@ class Solver():
arch = request["arch"]
releasever = request.get("releasever")
module_platform_id = request["module_platform_id"]
proxy = request["proxy"]
arguments = request["arguments"]
repos = arguments.get("repos", [])
@ -64,6 +65,8 @@ class Solver():
self.base.conf.substitutions['basearch'] = dnf.rpm.basearch(arch)
if releasever:
self.base.conf.substitutions['releasever'] = releasever
if proxy:
self.base.conf.proxy = proxy
req_repo_ids = set()
for repo in repos:

View file

@ -93,6 +93,7 @@ class Solver():
arch = request["arch"]
releasever = request.get("releasever")
module_platform_id = request["module_platform_id"]
proxy = request["proxy"]
arguments = request["arguments"]
repos = arguments.get("repos", [])
@ -115,6 +116,8 @@ class Solver():
self.base.get_vars().set("basearch", _BASEARCH_MAP[arch])
if releasever:
self.base.get_vars().set('releasever', releasever)
if proxy:
self.base.get_vars().set('proxy', proxy)
# Enable fastestmirror to ensure we choose the fastest mirrors for
# downloading metadata (when depsolving) and downloading packages.