Skip to content

Commit

Permalink
installer: Take into consideration provides names
Browse files Browse the repository at this point in the history
When installing a package that has a provides values, the installer only
checks the original package against the resolved package. This leads to
the requires keyword not working as expected as the solved final package
is never gonna match the name of the old/superseeded package.

This patch checks the asked-to-install package name against the list of
names that the matched name provides.

Signed-off-by: Itxaka <igarcia@suse.com>
  • Loading branch information
Itxaka committed Sep 6, 2021
1 parent 1786908 commit aba89db
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/installer/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,11 @@ func (l *LuetInstaller) Install(cp pkg.Packages, s *System) error {
if m.Package.GetName() == p.GetName() {
found = true
}
for _, pack := range m.Package.GetProvides() {
if pack.GetName() == p.GetName() {
found = true
}
}
}

if !found {
Expand Down

0 comments on commit aba89db

Please sign in to comment.