Skip to content

Commit

Permalink
noarch fix
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcacheux committed Oct 10, 2024
1 parent a74ae41 commit 888a4a9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rpm/opensuse.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ func (b *OpenSUSEBackend) GetKernelHeaders(directory string) error {
var installedPackages []dnfv2.PkgAndData
for _, targetPackageName := range packagesToInstall {
pkgMatcher := func(pkg *repo.PkgInfoHeader) bool {
return pkg.Name == targetPackageName && kernelRelease == fmt.Sprintf("%s-%s", pkg.Version.Ver, pkg.Version.Rel) && pkg.Arch == b.target.Uname.Machine
return pkg.Name == targetPackageName &&
kernelRelease == fmt.Sprintf("%s-%s", pkg.Version.Ver, pkg.Version.Rel) &&
(pkg.Arch == b.target.Uname.Machine || pkg.Arch == "noarch")
}

pkg, data, err := b.dnfBackend.FetchPackage(pkgMatcher)
Expand Down

0 comments on commit 888a4a9

Please sign in to comment.