util: arch: The Any value should be the same everywhere

In 80e8c9cadc when this was ported, the
"Any" value diverged accidentally. This would cause some packages to not
be found, since they didn't match any arch.

Thanks to karpfen to digging into the issue.
This commit is contained in:
James Shubin
2024-11-28 14:55:30 -05:00
parent 380004b1dc
commit c2f75d64a6

View File

@@ -31,18 +31,20 @@
// these all in one place so that adding this data happens all in the same file.
package arch
var (
const (
// Any is a special value meaning noarch or any arch.
Any = "*"
)
var (
// MapPackageKitArchToGoArch contains the mapping from PackageKit arch
// to GOARCH.
MapPackageKitArchToGoArch = map[string]string{
// TODO: add more values
// noarch
"noarch": "ANY", // as seen in Fedora
"any": "ANY", // as seen in ArchLinux
"all": "ANY", // as seen in Debian
"noarch": Any, // as seen in Fedora
"any": Any, // as seen in ArchLinux
"all": Any, // as seen in Debian
// fedora
"x86_64": "amd64",
"aarch64": "arm64",