Fix dependencies and test for DNF4 based osbuild-depsolve-dnf

For the DNF4 version, we actually use 'dnf' package and not 'libdnf'.
Fix the SPEC file dependencies and also the check in unit test.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
Tomáš Hozza 2024-09-19 17:16:15 +02:00 committed by Tomáš Hozza
parent b1c14ed422
commit ca1a21b923
2 changed files with 4 additions and 4 deletions

View file

@ -35,8 +35,8 @@ def assert_dnf5():
def assert_dnf():
if sp.run(["/usr/bin/python3", "-c", "import libdnf"], check=False).returncode != 0:
raise RuntimeError("Cannot import libdnf")
if sp.run(["/usr/bin/python3", "-c", "import dnf"], check=False).returncode != 0:
raise RuntimeError("Cannot import dnf")
def depsolve(transactions, repos, root_dir, cache_dir, dnf_config, opt_metadata, with_sbom=False) -> Tuple[dict, int]: