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

Proposed by Lee Trager
Status: Merged
Merged at revision: 409
Proposed branch: lp:~ltrager/maas-images/fix_building_bootloaders
Merge into: lp:maas-images
Diff against target: 27 lines (+8/-2)
1 file modified
meph2/commands/dpkg.py (+8/-2)
To merge this branch: bzr merge lp:~ltrager/maas-images/fix_building_bootloaders
Reviewer Review Type Date Requested Status
maintainers of maas images Pending
Review via email: mp+354064@code.launchpad.net

Commit message

Fix building bootloaders.

This fixes bootloaders failing to build due to being unable to verify the
deb file GPG key and works around LP:1790003 by specifying a prefix when
using grub-mkimage.

To post a comment you must log in.
Revision history for this message
Scott Moser (smoser) wrote :

As long as gpgv takes multiple --keyring arguments as you imply here the change looks fine.

Just some comments about readability. I've just learned to do subprocess code like this over time to (possibly) avoid having to type 'man some-command' in order to figure out:

  some-command -acf foo --flag1 --flag2 foo2 bar

Just better to do:
  some-command --activate --configure --file=foo --flag1 --flag2=foo2 bar

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'meph2/commands/dpkg.py'
--- meph2/commands/dpkg.py 2018-06-25 19:15:30 +0000
+++ meph2/commands/dpkg.py 2018-08-30 21:46:10 +0000
@@ -46,8 +46,13 @@
46 stream.write(data_file)46 stream.write(data_file)
4747
48 subprocess.check_output(48 subprocess.check_output(
49 ['gpgv', '--keyring', '/etc/apt/trusted.gpg', sig_out, data_out],49 [
50 stderr=subprocess.STDOUT)50 'gpgv',
51 '--keyring', os.path.join(
52 os.path.dirname(__file__), '..', '..', 'keyring.gpg'),
53 '--keyring', '/usr/share/keyrings/ubuntu-archive-keyring.gpg',
54 sig_out, data_out
55 ], stderr=subprocess.STDOUT)
5156
52 shutil.rmtree(tmp, ignore_errors=True)57 shutil.rmtree(tmp, ignore_errors=True)
5358
@@ -310,6 +315,7 @@
310 '-O', grub_format,315 '-O', grub_format,
311 '-d', modules_path,316 '-d', modules_path,
312 '-c', grub_config_path,317 '-c', grub_config_path,
318 '-p', '',
313 ] + modules)319 ] + modules)
314 else:320 else:
315 subprocess.check_output(321 subprocess.check_output(

Subscribers

People subscribed via source and target branches