assemblers/ostree.commit: set inputhash metadata
Use the new `meta` information passed to the assembler and use the id as the `rpmostree.inputhash` metadata that will get set on the commit.
This commit is contained in:
parent
72e00f3f2b
commit
b0bf9c9392
1 changed files with 6 additions and 3 deletions
|
|
@ -102,7 +102,7 @@ def init_rootfs(root, tmp_is_dir):
|
||||||
os.symlink("tmp", "sysroot/tmp", dir_fd=fd)
|
os.symlink("tmp", "sysroot/tmp", dir_fd=fd)
|
||||||
|
|
||||||
|
|
||||||
def main(tree, output_dir, options):
|
def main(tree, output_dir, options, meta):
|
||||||
ref = options["ref"]
|
ref = options["ref"]
|
||||||
tmp_is_dir = options.get("tmp-is-dir", True)
|
tmp_is_dir = options.get("tmp-is-dir", True)
|
||||||
parent = options.get("parent", None)
|
parent = options.get("parent", None)
|
||||||
|
|
@ -139,7 +139,10 @@ def main(tree, output_dir, options):
|
||||||
if parent:
|
if parent:
|
||||||
argv += [f"--parent={parent}"]
|
argv += [f"--parent={parent}"]
|
||||||
|
|
||||||
argv += [f"--write-composejson-to={output_dir}/compose.json"]
|
argv += [
|
||||||
|
f"--add-metadata-string=rpmostree.inputhash={meta['id']}",
|
||||||
|
f"--write-composejson-to={output_dir}/compose.json"
|
||||||
|
]
|
||||||
|
|
||||||
with treefile.as_tmp_file() as path:
|
with treefile.as_tmp_file() as path:
|
||||||
argv += [path, root]
|
argv += [path, root]
|
||||||
|
|
@ -166,5 +169,5 @@ def main(tree, output_dir, options):
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
args = json.load(sys.stdin)
|
args = json.load(sys.stdin)
|
||||||
r = main(args["tree"], args["output_dir"], args["options"])
|
r = main(args["tree"], args["output_dir"], args["options"], args["meta"])
|
||||||
sys.exit(r)
|
sys.exit(r)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue