Consider provides during upgrades

This commit is contained in:
Ettore Di Giacinto
2020-11-05 20:52:02 +01:00
parent 55ec38ffc7
commit 984366d3a5
4 changed files with 54 additions and 4 deletions

View File

@@ -374,6 +374,11 @@ func (db *BoltDatabase) FindPackages(p Package) (Packages, error) {
// FindPackageVersions return the list of the packages beloging to cat/name
func (db *BoltDatabase) FindPackageVersions(p Package) (Packages, error) {
// Provides: Treat as the replaced package here
if provided, err := db.getProvide(p); err == nil {
p = provided
}
var versionsInWorld []Package
for _, w := range db.World() {
if w.GetName() != p.GetName() || w.GetCategory() != p.GetCategory() {