From 50c458b6ccfd20ed0eb9af1e7225517bd7067130 Mon Sep 17 00:00:00 2001 From: James Shubin Date: Mon, 14 Mar 2016 04:15:29 -0400 Subject: [PATCH] Support "noarch" style packages in arch check Forgot about these :) --- packagekit.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packagekit.go b/packagekit.go index 3d9477f9..03ab7da5 100644 --- a/packagekit.go +++ b/packagekit.go @@ -49,6 +49,8 @@ var ( // GOARCH's: 386, amd64, arm, arm64, mips64, mips64le, ppc64, ppc64le PkArchMap = map[string]string{ // map of PackageKit arch to GOARCH // TODO: add more values + // noarch + "noarch": "ANY", // special value "ANY" // fedora "x86_64": "amd64", "aarch64": "arm64", @@ -834,5 +836,8 @@ func IsMyArch(arch string) bool { // if you get this error, please update the PkArchMap const log.Fatalf("PackageKit: Arch '%v', not found!", arch) } + if goarch == "ANY" { // special value that corresponds to noarch + return true + } return goarch == runtime.GOARCH }