From 99a7047173c0dcf67ef1ec39bd6d12b48740678d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= Date: Tue, 4 Feb 2025 18:07:27 +0100 Subject: [PATCH] tools/osbuild-depsolve-dnf: extend default config with loaded MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tools/osbuild-depsolve-dnf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/osbuild-depsolve-dnf b/tools/osbuild-depsolve-dnf index 3877d32f..144cb6d7 100755 --- a/tools/osbuild-depsolve-dnf +++ b/tools/osbuild-depsolve-dnf @@ -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