Skip to content

Commit

Permalink
gen-manifests: use archName in mockDepsolve()
Browse files Browse the repository at this point in the history
This commit adds the architecture to the faked packageset that
is generated via mockDepsolve() to ensure we catch cross-arch
manifest differences.
  • Loading branch information
mvo5 authored and achilleas-k committed Sep 23, 2024
1 parent d61acd7 commit 8a2d461
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/gen-manifests/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ func makeManifestJob(
return
}
} else {
packageSpecs, repoConfigs = mockDepsolve(manifest.GetPackageSetChains(), repos)
packageSpecs, repoConfigs = mockDepsolve(manifest.GetPackageSetChains(), repos, archName)
}
_ = repoConfigs

Expand Down Expand Up @@ -369,7 +369,7 @@ func depsolve(cacheDir string, packageSets map[string][]rpmmd.PackageSet, d dist
return depsolvedSets, repoSets, nil
}

func mockDepsolve(packageSets map[string][]rpmmd.PackageSet, repos []rpmmd.RepoConfig) (map[string][]rpmmd.PackageSpec, map[string][]rpmmd.RepoConfig) {
func mockDepsolve(packageSets map[string][]rpmmd.PackageSet, repos []rpmmd.RepoConfig, archName string) (map[string][]rpmmd.PackageSpec, map[string][]rpmmd.RepoConfig) {
depsolvedSets := make(map[string][]rpmmd.PackageSpec)
repoSets := make(map[string][]rpmmd.RepoConfig)
for name, pkgSetChain := range packageSets {
Expand All @@ -386,7 +386,7 @@ func mockDepsolve(packageSets map[string][]rpmmd.PackageSet, repos []rpmmd.RepoC
Epoch: 0,
Version: ver,
Release: rel + ".fk1",
Arch: "noarch",
Arch: archName,
RemoteLocation: fmt.Sprintf("https://example.com/repo/packages/%s", pkgName),
Checksum: "sha256:" + checksum,
}
Expand Down

0 comments on commit 8a2d461

Please sign in to comment.