mirror of
https://github.com/mudler/luet.git
synced 2025-09-13 05:42:52 +00:00
🐛 Bail out when no packages are found with default solvers (#296)
* 🐛 Bail out when no packages are found with default solvers Checking packages is more tricky when a resolver is set. Resolvers are capable of mutating the user request and remove part of the constraints in order to resolve a specific solution. This had the countereffect on a normal solver to not detect correctly packages when missing from the wanted set and not proposed during installation. This should fix all the cases above taking into consideration of resolvers and adding specific test-cases for it. * ⚙️ Pin to tag for test image
This commit is contained in:
committed by
GitHub
parent
b5da2fa7b4
commit
1006be9271
@@ -40,6 +40,13 @@ type Solver struct {
|
||||
Resolver types.PackageResolver
|
||||
}
|
||||
|
||||
// IsRelaxedResolver returns true wether a solver might
|
||||
// take action on user side, by removing some installation constraints
|
||||
// or taking automated actions (e.g. qlearning)
|
||||
func IsRelaxedResolver(t types.LuetSolverOptions) bool {
|
||||
return t.Type == QLearningResolverType
|
||||
}
|
||||
|
||||
// NewSolver accepts as argument two lists of packages, the first is the initial set,
|
||||
// the second represent all the known packages.
|
||||
func NewSolver(t types.SolverOptions, installed types.PackageDatabase, definitiondb types.PackageDatabase, solverdb types.PackageDatabase) types.PackageSolver {
|
||||
|
Reference in New Issue
Block a user