Merge lp:~fancycode/goget-ubuntu-touch/set-oem-architecture into lp:goget-ubuntu-touch

Proposed by Joachim Bauch on 2015-10-30
Status: Needs review
Proposed branch: lp:~fancycode/goget-ubuntu-touch/set-oem-architecture
Merge into: lp:goget-ubuntu-touch
Diff against target: 13 lines (+3/-0)
1 file modified
ubuntu-device-flash/snappy.go (+3/-0)
To merge this branch: bzr merge lp:~fancycode/goget-ubuntu-touch/set-oem-architecture
Reviewer Review Type Date Requested Status
Sergio Schvezov 2015-10-30 Needs Fixing on 2015-10-30
Review via email: mp+276260@code.launchpad.net

Description of the change

With this change, you can use u-d-f to cross build a system image including additional built-in/preinstalled snaps, e.g. build an "armhf" image on an "amd64" host system.

This needs https://github.com/ubuntu-core/snappy/pull/40 to be merged to get the new API.

To post a comment you must log in.
Joachim Bauch (fancycode) wrote :

I tried, but the architecture checks when installing additional snaps in the image are using the API from the "helpers" package, that's why I introduced a "Set..." API there too and are calling both from here.

Sergio Schvezov (sergiusens) wrote :

On Fri, Oct 30, 2015 at 11:02 AM, Joachim Bauch <email address hidden>
wrote:

> I tried, but the architecture checks when installing additional snaps in
> the image are using the API from the "helpers" package, that's why I
> introduced a "Set..." API there too and are calling both from here.

It is then better to have snappy.SetArchitecture set the Arch in the
helpers, The helpers are private to snappy itself, or not meant for
consumption.

217. By Joachim Bauch on 2015-10-30

Don't set architecture in "helpers", will be done implicitly.

Joachim Bauch (fancycode) wrote :

Ok, I wasn't aware of that ("helpers" is actually used in u-d-f). Anyway, changed here and in the PR on GitHub.

Unmerged revisions

217. By Joachim Bauch on 2015-10-30

Don't set architecture in "helpers", will be done implicitly.

216. By Joachim Bauch on 2015-10-30

Set the snappy architecture from the OEM package to allow cross-building.

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-09-16 11:13:20 +0000
3+++ ubuntu-device-flash/snappy.go 2015-10-30 14:28:25 +0000
4@@ -251,6 +251,9 @@
5 }
6 s.oem = oem
7 s.oem.SetRoot(systemPath)
8+ if oem.Architecture() != "" {
9+ snappy.SetArchitecture(snappy.ArchitectureType(oem.Architecture()))
10+ }
11
12 return nil
13 }

Subscribers

People subscribed via source and target branches