From 12e6a85661e48e3be0ce73cc0be6e620754a7436 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Tue, 10 Oct 2017 10:42:58 +0100 Subject: [PATCH] Make `linuxkit pkg build` on an unsupported arch a nop Rather than a hard fail. This allows batch builds of a set of packages without the surrounding loop needing to be away of the possibility. Signed-off-by: Ian Campbell --- src/cmd/linuxkit/pkglib/build.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cmd/linuxkit/pkglib/build.go b/src/cmd/linuxkit/pkglib/build.go index b919a8f0b..4bf8fa991 100644 --- a/src/cmd/linuxkit/pkglib/build.go +++ b/src/cmd/linuxkit/pkglib/build.go @@ -46,7 +46,8 @@ func (p Pkg) Build(bos ...BuildOpt) error { arch := runtime.GOARCH if !p.archSupported(arch) { - return fmt.Errorf("Arch %s not supported by this package", arch) + fmt.Printf("Arch %s not supported by this package, skipping build.\n", arch) + return nil } if err := p.cleanForBuild(); err != nil { return err