Skip to content

Commit

Permalink
cmd-buildprep: Add --ostree flag to download full commit
Browse files Browse the repository at this point in the history
Add an `--ostree` flag to also download the OSTree commit. This is
needed to close a gap where only the image input changed, so no new
OSTree content is created, and so we need the full OSTree content in
order to build the new images.
  • Loading branch information
jlebon authored and dustymabe committed Sep 13, 2019
1 parent 06ba9f9 commit 6a61cd3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/cmd-buildprep
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ def main():
assert builddir.startswith("builds/")
builddir = builddir[len("builds/"):]

for f in ['meta.json', 'ostree-commit-object']:
objects = ['meta.json', 'ostree-commit-object']
if args.ostree:
objects += ['ostree-commit.tar']

for f in objects:
fetcher.fetch(f'{builddir}/{f}')

# and finally the symlink
Expand All @@ -69,6 +73,8 @@ def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument("url", metavar='URL',
help="URL from which to fetch metadata")
parser.add_argument("--ostree", action='store_true',
help="Also download full OSTree commit")
return parser.parse_args()


Expand Down

0 comments on commit 6a61cd3

Please sign in to comment.