From 34d047e68bc80b16f00f731b3c9e245cf634a24c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 18 Sep 2024 11:48:16 +0200 Subject: [PATCH] gen-depsolve-dnf4: adjust mockdata() for new `exclude:` prefix This commit follows https://github.com/osbuild/images/pull/938 and adjust the way excludes are represented. --- src/otk_external_osbuild/command/gen_depsolve_dnf4.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/otk_external_osbuild/command/gen_depsolve_dnf4.py b/src/otk_external_osbuild/command/gen_depsolve_dnf4.py index 5ae734f1..1aa6d0eb 100644 --- a/src/otk_external_osbuild/command/gen_depsolve_dnf4.py +++ b/src/otk_external_osbuild/command/gen_depsolve_dnf4.py @@ -34,7 +34,7 @@ def mockdata(packages): "release": "0", "arch": "noarch", } - for p in packages + for p in packages["include"] + [f"exclude:{p}" for p in packages["exclude"]] ] @@ -42,7 +42,7 @@ def root(input_stream: TextIO) -> None: data = json.loads(input_stream.read()) tree = data["tree"] if "OTK_UNDER_TEST" in os.environ: - packages = mockdata(tree["packages"]["include"]) + packages = mockdata(tree["packages"]) sys.stdout.write(json.dumps(transform(packages))) return