osbuild-depsolve-dnf: refactor into osbuild.solver module
This moves the dnf and dnf5 code into a new osbuild module called solver. The dnf specific code is in dnf.py and dnf5 is in dnf5.py At runtime the osbuild-depsolve-dnf script reads a config file from /usr/lib/osbuild/solver.json and imports the selected solver. This currently just contains a 'use_dnf5' bool but can be extended to support other configuration options or depsolvers. At build time a config file is selected from tools/solver-dnf.json or tools/solver-dnf5.json and installed. Currently dnf5 is not installed, it will be added when dnf5 5.2.1.0 becomes available in rawhide (Fedora 41). The error messages have been normalized since the top level functions in osbuild-depsolve-dnf do not know which version of dnf is being used.
This commit is contained in:
parent
7b16313ce2
commit
f17ab5cbaf
8 changed files with 483 additions and 573 deletions
2
setup.py
2
setup.py
|
|
@ -4,7 +4,7 @@ setuptools.setup(
|
|||
name="osbuild",
|
||||
version="125",
|
||||
description="A build system for OS images",
|
||||
packages=["osbuild", "osbuild.formats", "osbuild.util"],
|
||||
packages=["osbuild", "osbuild.formats", "osbuild.util","osbuild.solver"],
|
||||
license='Apache-2.0',
|
||||
install_requires=[
|
||||
"jsonschema",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue