Merge lp://staging/~mvo/ubuntu/vivid/ubuntu-core-upgrader/unpack-hardware-yaml into lp://staging/ubuntu/vivid/ubuntu-core-upgrader

Proposed by Michael Vogt
Status: Merged
Merged at revision: 13
Proposed branch: lp://staging/~mvo/ubuntu/vivid/ubuntu-core-upgrader/unpack-hardware-yaml
Merge into: lp://staging/ubuntu/vivid/ubuntu-core-upgrader
Diff against target: 59 lines (+19/-2)
3 files modified
debian/changelog (+11/-0)
ubuntucoreupgrader/tests/test_upgrader.py (+3/-1)
ubuntucoreupgrader/upgrader.py (+5/-1)
To merge this branch: bzr merge lp://staging/~mvo/ubuntu/vivid/ubuntu-core-upgrader/unpack-hardware-yaml
Reviewer Review Type Date Requested Status
Sergio Schvezov (community) Needs Fixing
James Hunt (community) Approve
Review via email: mp+251607@code.staging.launchpad.net

Description of the change

This branch also extracts "hardware.yaml" so that snappy-go (snappy is fine as it hardcodes the names) find
the file that describes what is in assets/. This fixes upgrades that
contains a new kernel/initrd/dtb. Thanks to Sergio for reporting the
issue.

To post a comment you must log in.
Revision history for this message
James Hunt (jamesodhunt) wrote :

This LGTM. However, since the upgrader is not now removing hardware.yaml, please can you make sure that the hardware.yaml gets removed by snappy (HandleAssets()).

review: Approve
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for the review, lp:~mvo/snappy/handle-hardware-yaml should take care of this on the snappy-go side.

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

It doesn't seem to work.

ubuntu@localhost:~$ sudo ./snappy-go update
Installing ubuntu-core (163)
Starting download of ubuntu-core
139.67 KB / 139.67 KB [=================================] 100.00 % 8.87 KB/s 15s
Done
open /writable/cache/hardware.yaml: no such file or directory
ubuntu@localhost:~$ ls /writable/cache/
system
ubuntu@localhost:~$ grep YAML /writable/cache/system/usr/lib/python3/dist-packages/ubuntucoreupgrader/upgrader.py
TAR_FILE_HARDWARE_YAML = 'hardware.yaml'
        if not (member.name == TAR_FILE_HARDWARE_YAML or
ubuntu@localhost:~$ grep YAML /usr/lib/python3/dist-packages/ubuntucoreupgrader/upgrader.py
TAR_FILE_HARDWARE_YAML = 'hardware.yaml'
        if not (member.name == TAR_FILE_HARDWARE_YAML or

review: Needs Fixing
Revision history for this message
James Hunt (jamesodhunt) wrote :

It looks like snappy-go is assuming that there will always be a device_part and hence will always be a hardware.yaml to remove (which is not the case).

Revision history for this message
James Hunt (jamesodhunt) wrote :

there will always be a hardware.yaml to read (and then delete) I mean :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: