mirror of
https://github.com/mudler/luet.git
synced 2025-08-11 04:02:08 +00:00
Resolvers might omit packages
This commit is contained in:
parent
d668d8344b
commit
cf80e5fc09
@ -71,6 +71,15 @@ type LuetSolverOptions struct {
|
|||||||
Implementation solver.SolverType `mapstructure:"implementation"`
|
Implementation solver.SolverType `mapstructure:"implementation"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (opts LuetSolverOptions) ResolverIsSet() bool {
|
||||||
|
switch opts.Type {
|
||||||
|
case solver.QLearningResolverType:
|
||||||
|
return true
|
||||||
|
default:
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (opts LuetSolverOptions) Resolver() solver.PackageResolver {
|
func (opts LuetSolverOptions) Resolver() solver.PackageResolver {
|
||||||
switch opts.Type {
|
switch opts.Type {
|
||||||
case solver.QLearningResolverType:
|
case solver.QLearningResolverType:
|
||||||
|
@ -288,7 +288,8 @@ func (l *LuetInstaller) Install(cp pkg.Packages, s *System) error {
|
|||||||
Info("No packages to install")
|
Info("No packages to install")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
// Resolvers might decide to remove some packages from being installed
|
||||||
|
if !l.Options.SolverOptions.ResolverIsSet() {
|
||||||
for _, p := range cp {
|
for _, p := range cp {
|
||||||
found := false
|
found := false
|
||||||
for _, m := range match {
|
for _, m := range match {
|
||||||
@ -300,6 +301,7 @@ func (l *LuetInstaller) Install(cp pkg.Packages, s *System) error {
|
|||||||
return fmt.Errorf("Package '%s' not found", p.HumanReadableString())
|
return fmt.Errorf("Package '%s' not found", p.HumanReadableString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Info("Packages that are going to be installed in the system: \n ", Green(matchesToList(match)).BgBlack().String())
|
Info("Packages that are going to be installed in the system: \n ", Green(matchesToList(match)).BgBlack().String())
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user