mirror of
https://github.com/mudler/luet.git
synced 2025-09-01 15:18:28 +00:00
Make sure we do compute the best fit
While install calls upgrade which in turns calls a relaxed install on its results, this doesn't make sure that the new results are at the best available version. We do iterate here over the results to compute the best set. It also expands computeUpgrade with the possibility to selectively choose which packages to upgrade and which not.
This commit is contained in:
@@ -146,6 +146,17 @@ func (assertions PackagesAssertions) Search(f string) *PackageAssert {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (assertions PackagesAssertions) ToDB() pkg.PackageDatabase {
|
||||
db := pkg.NewInMemoryDatabase(false)
|
||||
for _, a := range assertions {
|
||||
if a.Value {
|
||||
db.CreatePackage(a.Package)
|
||||
}
|
||||
}
|
||||
|
||||
return db
|
||||
}
|
||||
|
||||
func (assertions PackagesAssertions) Order(definitiondb pkg.PackageDatabase, fingerprint string) (PackagesAssertions, error) {
|
||||
|
||||
orderedAssertions := PackagesAssertions{}
|
||||
|
Reference in New Issue
Block a user