Enhance Uninstall and resolve conflict sets

Compute a minimum conflict set over the uninstall.

Adds also tests for specific cases covered by Uninstall now
This commit is contained in:
Ettore Di Giacinto
2019-06-11 18:03:50 +02:00
parent 5f98a665a5
commit ff582ce77c
7 changed files with 378 additions and 20 deletions

View File

@@ -19,11 +19,15 @@ import (
pkg "github.com/mudler/luet/pkg/package"
)
// PackageAssert represent a package assertion.
// It is composed of a Package and a Value which is indicating the absence or not
// of the associated package state.
type PackageAssert struct {
Package pkg.Package
Value bool
}
// DecodeModel decodes a model from the SAT solver to package assertions (PackageAssert)
func DecodeModel(model map[string]bool) ([]PackageAssert, error) {
ass := make([]PackageAssert, 0)
for k, v := range model {