Merge lp:~ricmm/goget-ubuntu-touch/no-legacy-subarches into lp:goget-ubuntu-touch

Proposed by Ricardo Mendoza on 2015-11-12
Status: Needs review
Proposed branch: lp:~ricmm/goget-ubuntu-touch/no-legacy-subarches
Merge into: lp:goget-ubuntu-touch
Diff against target: 22 lines (+5/-0)
1 file modified
ubuntu-device-flash/snappy.go (+5/-0)
To merge this branch: bzr merge lp:~ricmm/goget-ubuntu-touch/no-legacy-subarches
Reviewer Review Type Date Requested Status
Sergio Schvezov Needs Fixing on 2015-11-12
Michael Vogt 2015-11-12 Approve on 2015-11-12
Review via email: mp+277386@code.launchpad.net
To post a comment you must log in.
Michael Vogt (mvo) wrote :

+1

review: Approve
Sergio Schvezov (sergiusens) wrote :

A regex might be better here in case we ever create a new arch with generic.

Also, why isn't this implemented in isLegacy?

review: Needs Fixing

Unmerged revisions

218. By Ricardo Mendoza on 2015-11-12

There are no legacy setups in non generic channels, so make sure we dont accidentally build a legacy grub config.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntu-device-flash/snappy.go'
2--- ubuntu-device-flash/snappy.go 2015-11-12 16:48:10 +0000
3+++ ubuntu-device-flash/snappy.go 2015-11-12 19:54:05 +0000
4@@ -19,6 +19,7 @@
5 "runtime"
6 "syscall"
7 "time"
8+ "strings"
9
10 "github.com/ubuntu-core/snappy/dirs"
11 "github.com/ubuntu-core/snappy/helpers"
12@@ -519,6 +520,10 @@
13 switch loader {
14 case "grub":
15 legacy := isLegacy(s.Positional.Release, s.Channel, globalArgs.Revision)
16+ // Only generic channels contain legacy revisions of bootloader setup
17+ if !strings.Contains(s.Channel, "generic") {
18+ legacy = false
19+ }
20 if legacy {
21 printOut("Using legacy setup")
22 }

Subscribers

People subscribed via source and target branches