Skip to content

Commit

Permalink
gen-depsolve-dnf4: adjust mockdata() for new exclude: prefix
Browse files Browse the repository at this point in the history
This commit follows osbuild/images#938
and adjust the way excludes are represented.
  • Loading branch information
mvo5 committed Sep 24, 2024
1 parent 6d4d50a commit 307022e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/otk_external_osbuild/command/gen_depsolve_dnf4.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ def mockdata(packages):
"release": "0",
"arch": "noarch",
}
for p in packages
for p in packages["include"] + [f"exclude:{p}" for p in packages["exclude"]]
]


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

Expand Down

0 comments on commit 307022e

Please sign in to comment.