Skip to content

Commit

Permalink
buildextend-live: Support bootupd
Browse files Browse the repository at this point in the history
Followup to coreos@5633655

Caught in CI for coreos/fedora-coreos-config#595
  • Loading branch information
cgwalters committed Sep 22, 2020
1 parent a0b4206 commit 4df072f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/cmd-buildextend-live
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,15 @@ from cosalib.meta import GenericBuildMeta

def ostree_extract_efi(repo, commit, destdir):
"""Given an OSTree commit, extract the EFI parts"""
ostreeefidir = "/usr/lib/ostree-boot/efi/EFI"
efidir = "/usr/lib/ostree-boot/efi/EFI"
# Handle both "with bootupd" and without.
# https://github.com/coreos/bootupd/
# See also create_disk.py
if subprocess.run(['ostree', f'--repo={repo}', 'ls', commit, '/usr/lib/bootupd'],
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL).returncode == 0:
efidir = "/usr/lib/bootupd/updates/EFI"
run_verbose(['/usr/bin/ostree', 'checkout', '--repo', repo,
'--user-mode', '--subpath', ostreeefidir,
'--user-mode', '--subpath', efidir,
commit, destdir])


Expand Down

0 comments on commit 4df072f

Please sign in to comment.