[lxc-devel] [distrobuilder/master] definition: Use kernel architecture name

stgraber on Github lxc-bot at linuxcontainers.org
Wed Mar 14 18:39:05 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 362 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180314/16cfdf2b/attachment.bin>
-------------- next part --------------
From beb6f9345df448cd98fc7365f26d85993c19f39b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Wed, 14 Mar 2018 14:38:40 -0400
Subject: [PATCH] definition: Use kernel architecture name
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 shared/definition.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/shared/definition.go b/shared/definition.go
index f44d3d7..9e58456 100644
--- a/shared/definition.go
+++ b/shared/definition.go
@@ -3,7 +3,6 @@ package shared
 import (
 	"errors"
 	"fmt"
-	"runtime"
 	"strings"
 	"time"
 
@@ -98,7 +97,8 @@ type Definition struct {
 func SetDefinitionDefaults(def *Definition) {
 	// default to local arch
 	if def.Image.Architecture == "" {
-		def.Image.Architecture = runtime.GOARCH
+		uname, _ := shared.Uname()
+		def.Image.Architecture = uname.Machine
 	}
 
 	// set default expiry of 30 days


More information about the lxc-devel mailing list