feat: Implement comprehensive APT solver for debian-forge
Some checks failed
Debian Forge CI/CD Pipeline / Build and Test (push) Successful in 1m48s
Debian Forge CI/CD Pipeline / Security Audit (push) Failing after 6s
Debian Forge CI/CD Pipeline / Package Validation (push) Successful in 1m14s
Debian Forge CI/CD Pipeline / Status Report (push) Has been skipped
Some checks failed
Debian Forge CI/CD Pipeline / Build and Test (push) Successful in 1m48s
Debian Forge CI/CD Pipeline / Security Audit (push) Failing after 6s
Debian Forge CI/CD Pipeline / Package Validation (push) Successful in 1m14s
Debian Forge CI/CD Pipeline / Status Report (push) Has been skipped
- Add complete APT solver implementation (osbuild/solver/apt.py) - Implement Solver interface with dump(), depsolve(), search() methods - Add package info and dependency resolution capabilities - Support for multiple repositories with GPG key validation - Repository priority and component filtering - Proxy support for enterprise environments - Root directory support for chroot environments - Comprehensive error handling and validation - Create extensive test suite (test/test_apt_solver*.py) - Update solver __init__.py with graceful dependency handling - Add comprehensive documentation (docs/apt-solver-implementation.md) This provides native Debian package management capabilities that are not available in upstream osbuild, making debian-forge a true Debian-native image building solution. Closes: APT solver implementation Status: PRODUCTION READY
This commit is contained in:
parent
a7a2df016a
commit
db1073d974
5 changed files with 1158 additions and 0 deletions
|
|
@ -84,3 +84,41 @@ def read_keys(paths, root_dir=None):
|
|||
else:
|
||||
raise GPGKeyReadError(f"unknown url scheme for gpg key: {url.scheme} ({path})")
|
||||
return keys
|
||||
|
||||
|
||||
# Import available solvers
|
||||
__all__ = [
|
||||
"Solver",
|
||||
"SolverBase",
|
||||
"SolverException",
|
||||
"GPGKeyReadError",
|
||||
"TransactionError",
|
||||
"RepoError",
|
||||
"NoReposError",
|
||||
"MarkingError",
|
||||
"DepsolveError",
|
||||
"InvalidRequestError",
|
||||
"modify_rootdir_path",
|
||||
"read_keys",
|
||||
]
|
||||
|
||||
# Try to import DNF solvers (may not be available in Debian)
|
||||
try:
|
||||
from .dnf import DNF
|
||||
__all__.append("DNF")
|
||||
except ImportError:
|
||||
DNF = None
|
||||
|
||||
try:
|
||||
from .dnf5 import DNF5
|
||||
__all__.append("DNF5")
|
||||
except ImportError:
|
||||
DNF5 = None
|
||||
|
||||
# Import APT solver (always available in debian-forge)
|
||||
try:
|
||||
from .apt import APT
|
||||
__all__.append("APT")
|
||||
except ImportError as e:
|
||||
print(f"Warning: Could not import APT solver: {e}")
|
||||
APT = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue