Code review comment for lp:~wallyworld/juju-core/fix-reported-arch-arm64

Revision history for this message
Ian Booth (wallyworld) wrote :

Reviewers: mp+215074_code.launchpad.net,

Message:
Please take a look.

Description:
Fix reported arch on arm64 machines

There was an error in NormaliseArch() which
caused the architecture on arm64 machines to
be misreported as armhf

https://code.launchpad.net/~wallyworld/juju-core/fix-reported-arch-arm64/+merge/215074

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/86360043/

Affected files (+4, -1 lines):
   A [revision details]
   M juju/arch/arch.go
   M juju/arch/arch_test.go

Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: tarmac-20140410013109-sz235hrw7hnxapei
+New revision: <email address hidden>

Index: juju/arch/arch.go
=== modified file 'juju/arch/arch.go'
--- juju/arch/arch.go 2014-04-09 16:36:12 +0000
+++ juju/arch/arch.go 2014-04-10 04:05:56 +0000
@@ -35,7 +35,7 @@
  }{
   {regexp.MustCompile("amd64|x86_64"), AMD64},
   {regexp.MustCompile("i?[3-9]86"), I386},
- {regexp.MustCompile("arm|armv.*"), ARM},
+ {regexp.MustCompile("(arm$)|(armv.*)"), ARM},
   {regexp.MustCompile("aarch64"), ARM64},
   {regexp.MustCompile("ppc64el|ppc64le"), PPC64},
  }

Index: juju/arch/arch_test.go
=== modified file 'juju/arch/arch_test.go'
--- juju/arch/arch_test.go 2014-04-09 16:36:12 +0000
+++ juju/arch/arch_test.go 2014-04-10 04:05:56 +0000
@@ -37,6 +37,7 @@
    {"armv", "armhf"},
    {"armv7", "armhf"},
    {"aarch64", "arm64"},
+ {"arm64", "arm64"},
    {"ppc64el", "ppc64"},
    {"ppc64le", "ppc64"},
   } {

« Back to merge proposal