Merge lp:~wallyworld/juju-core/fix-reported-arch-arm64 into lp:~go-bot/juju-core/trunk

Proposed by Ian Booth
Status: Merged
Approved by: Ian Booth
Approved revision: no longer in the source branch.
Merged at revision: 2600
Proposed branch: lp:~wallyworld/juju-core/fix-reported-arch-arm64
Merge into: lp:~go-bot/juju-core/trunk
Diff against target: 24 lines (+2/-1)
2 files modified
juju/arch/arch.go (+1/-1)
juju/arch/arch_test.go (+1/-0)
To merge this branch: bzr merge lp:~wallyworld/juju-core/fix-reported-arch-arm64
Reviewer Review Type Date Requested Status
Juju Engineering Pending
Review via email: mp+215074@code.launchpad.net

Commit message

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://codereview.appspot.com/86360043/

Description of the change

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://codereview.appspot.com/86360043/

To post a comment you must log in.
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"},
   } {

Revision history for this message
Dave Cheney (dave-cheney) wrote :

LGTM.

On Thu, Apr 10, 2014 at 2:12 PM, Ian Booth <email address hidden> 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"},
> } {
>
>
>
>
>
> --
> https://code.launchpad.net/~wallyworld/juju-core/fix-reported-arch-arm64/+merge/215074
> You are subscribed to branch lp:juju-core.

Revision history for this message
Tim Penhey (thumper) wrote :

https://codereview.appspot.com/86360043/diff/1/juju/arch/arch.go
File juju/arch/arch.go (left):

https://codereview.appspot.com/86360043/diff/1/juju/arch/arch.go#oldcode39
juju/arch/arch.go:39: {regexp.MustCompile("aarch64"), ARM64},
does this line need to be
"aarch64|arm64" ?

https://codereview.appspot.com/86360043/diff/1/juju/arch/arch_test.go
File juju/arch/arch_test.go (right):

https://codereview.appspot.com/86360043/diff/1/juju/arch/arch_test.go#newcode40
juju/arch/arch_test.go:40: {"arm64", "arm64"},
How does this pass?

https://codereview.appspot.com/86360043/

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

https://codereview.appspot.com/86360043/diff/1/juju/arch/arch.go
File juju/arch/arch.go (left):

https://codereview.appspot.com/86360043/diff/1/juju/arch/arch.go#oldcode39
juju/arch/arch.go:39: {regexp.MustCompile("aarch64"), ARM64},
On 2014/04/10 10:49:31, thumper wrote:
> does this line need to be
> "aarch64|arm64" ?

Not strictly speaking. Any unmatched inputs are passed through as is

https://codereview.appspot.com/86360043/diff/1/juju/arch/arch_test.go
File juju/arch/arch_test.go (right):

https://codereview.appspot.com/86360043/diff/1/juju/arch/arch_test.go#newcode40
juju/arch/arch_test.go:40: {"arm64", "arm64"},
On 2014/04/10 10:49:31, thumper wrote:
> How does this pass?

If there's no regexp match it just passes through

https://codereview.appspot.com/86360043/

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

This is landed since Dave approved the LP mp.

https://codereview.appspot.com/86360043/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'juju/arch/arch.go'
2--- juju/arch/arch.go 2014-04-09 16:36:12 +0000
3+++ juju/arch/arch.go 2014-04-10 04:09:21 +0000
4@@ -35,7 +35,7 @@
5 }{
6 {regexp.MustCompile("amd64|x86_64"), AMD64},
7 {regexp.MustCompile("i?[3-9]86"), I386},
8- {regexp.MustCompile("arm|armv.*"), ARM},
9+ {regexp.MustCompile("(arm$)|(armv.*)"), ARM},
10 {regexp.MustCompile("aarch64"), ARM64},
11 {regexp.MustCompile("ppc64el|ppc64le"), PPC64},
12 }
13
14=== modified file 'juju/arch/arch_test.go'
15--- juju/arch/arch_test.go 2014-04-09 16:36:12 +0000
16+++ juju/arch/arch_test.go 2014-04-10 04:09:21 +0000
17@@ -37,6 +37,7 @@
18 {"armv", "armhf"},
19 {"armv7", "armhf"},
20 {"aarch64", "arm64"},
21+ {"arm64", "arm64"},
22 {"ppc64el", "ppc64"},
23 {"ppc64le", "ppc64"},
24 } {

Subscribers

People subscribed via source and target branches

to status/vote changes: