Merge lp:~ltrager/maas-images/xenial_ppc_bootloader into lp:maas-images

Proposed by Lee Trager on 2018-08-07
Status: Merged
Merged at revision: 406
Proposed branch: lp:~ltrager/maas-images/xenial_ppc_bootloader
Merge into: lp:maas-images
Diff against target: 43 lines (+12/-10)
2 files modified
conf/bootloaders.yaml (+1/-1)
meph2/commands/mimport.py (+11/-9)
To merge this branch: bzr merge lp:~ltrager/maas-images/xenial_ppc_bootloader
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) 2018-08-07 Approve on 2018-08-07
Review via email: mp+352678@code.launchpad.net

Commit message

Revert Open Firmware PPC64EL bootloader to Xenial.

The Bionic bootloader for Open Firmware PPC64EL is requesting a GRUB
configuration file for the wrong MAC address(LP:1785859). Until this
bug is fixed revert to the Xenial bootloader.

To allow the bootloader to be reverted lp:maas-images will now only look to see if the bootloader discovered in the archive differs from the latest
bootloader in the stream. Older bootloaders in the stream are ignored. This allows the release for each bootloader to be reverted to an older version or upgraded to a newer version without changing anything other than bootloaders.yaml.

To post a comment you must log in.
Andres Rodriguez (andreserl) wrote :

lgtm!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'conf/bootloaders.yaml'
2--- conf/bootloaders.yaml 2018-07-19 03:21:42 +0000
3+++ conf/bootloaders.yaml 2018-08-07 21:41:25 +0000
4@@ -54,7 +54,7 @@
5 arch: ppc64el
6 arches: ppc64el,ppc64
7 archive: http://ports.ubuntu.com
8- release: bionic
9+ release: xenial
10 os: grub-ieee1275
11 files:
12 - usr/lib/grub/powerpc-ieee1275/
13
14=== modified file 'meph2/commands/mimport.py'
15--- meph2/commands/mimport.py 2018-04-18 21:25:35 +0000
16+++ meph2/commands/mimport.py 2018-08-07 21:41:25 +0000
17@@ -112,15 +112,17 @@
18 # the packages in the archive
19 if product_id in product_tree['products']:
20 versions = product_tree['products'][product_id]['versions']
21- for data in versions.values():
22- for item in data['items'].values():
23- src_package = src_packages.get(item['src_package'])
24- if (
25- src_package is not None and
26- src_package['src_version'] == item['src_version']
27- and
28- src_package['src_release'] == item['src_release']):
29- src_packages[item['src_package']]['found'] = True
30+ # Only check if the latest version in the stream matches the
31+ # latest version from the archive. This allows bootloaders to
32+ # be reverted to previous versions.
33+ data = versions[max(versions.keys())]
34+ for item in data['items'].values():
35+ src_package = src_packages.get(item['src_package'])
36+ if (
37+ src_package is not None and
38+ src_package['src_version'] == item['src_version'] and
39+ src_package['src_release'] == item['src_release']):
40+ src_packages[item['src_package']]['found'] = True
41 bootloader_uptodate = True
42 for src_package in src_packages.values():
43 if not src_package['found']:

Subscribers

People subscribed via source and target branches