installer: Take into consideration provides names

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>
This commit is contained in:
Itxaka 2021-09-06 14:58:50 +02:00
parent 178690842f
commit aba89db204

View File

@ -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 {