mudler / luet

:package: :whale: 0-dependency Container-based Package Manager using SAT solver and QLearning
https://luet.io
GNU General Public License v3.0
254 stars 24 forks source link

:bug: Bail out when no packages are found with default solvers #296

Closed mudler closed 2 years ago

mudler commented 2 years ago

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.

codecov-commenter commented 2 years ago

Codecov Report

Merging #296 (992efc9) into master (b5da2fa) will increase coverage by 0.45%. The diff coverage is 60.00%.

@@            Coverage Diff             @@
##           master     #296      +/-   ##
==========================================
+ Coverage   49.86%   50.32%   +0.45%     
==========================================
  Files          65       65              
  Lines        9784     9800      +16     
==========================================
+ Hits         4879     4932      +53     
+ Misses       4326     4301      -25     
+ Partials      579      567      -12     
Impacted Files Coverage Δ
pkg/api/core/types/package.go 47.01% <0.00%> (-0.15%) :arrow_down:
pkg/solver/solver.go 72.63% <0.00%> (-0.26%) :arrow_down:
pkg/installer/installer.go 61.18% <71.42%> (+2.13%) :arrow_up:
pkg/installer/repository.go 58.56% <0.00%> (+1.47%) :arrow_up:
pkg/installer/repository_docker.go 56.37% <0.00%> (+6.37%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b5da2fa...992efc9. Read the comment docs.