tools/osbuild-depsolve-dnf: extend default config with loaded
Instead of completely overriding the default solver configuration with the one loaded from a file, just extend the default config. This will allow to specify just desired config options and keeping the defaults for the rest. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
cce8ee31c4
commit
99a7047173
1 changed files with 2 additions and 1 deletions
|
|
@ -20,7 +20,8 @@ config = {"use_dnf5": False}
|
|||
config_path = os.environ.get("OSBUILD_SOLVER_CONFIG") or "/usr/lib/osbuild/solver.json"
|
||||
try:
|
||||
with open(config_path, encoding="utf-8") as f:
|
||||
config = json.load(f)
|
||||
loaded_config = json.load(f)
|
||||
config.update(loaded_config)
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue