From c2f75d64a65223c96b753a9edc2e7e7befd9bdf3 Mon Sep 17 00:00:00 2001 From: James Shubin Date: Thu, 28 Nov 2024 14:55:30 -0500 Subject: [PATCH] util: arch: The Any value should be the same everywhere In 80e8c9cadcb3ab1f2a8fa619d81cf13d240b7b34 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. --- util/arch/arch.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/util/arch/arch.go b/util/arch/arch.go index 118bbb7c..0ba236b2 100644 --- a/util/arch/arch.go +++ b/util/arch/arch.go @@ -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",