From d3023ec7f7715bcd2d6cd2d056e63b04b9aff8db Mon Sep 17 00:00:00 2001 From: Martin Sehnoutka Date: Fri, 21 Jun 2019 13:19:10 +0200 Subject: [PATCH] move the resulting image into the output directory --- assemblers/io.weldr.qcow2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assemblers/io.weldr.qcow2 b/assemblers/io.weldr.qcow2 index 2938a950..569a611b 100755 --- a/assemblers/io.weldr.qcow2 +++ b/assemblers/io.weldr.qcow2 @@ -47,6 +47,7 @@ def main(tree, input_dir, options): filename = options["filename"] partition_table_id = options["partition_table_id"] root_fs_uuid = options["root_fs_uuid"] + output_dir = options["output_dir"] # Create a working directory on a tmpfs, maybe we should implicitly # always do this. @@ -74,7 +75,7 @@ def main(tree, input_dir, options): with mount_api(mountpoint): subprocess.run(["chroot", mountpoint, "grub2-install", "--no-floppy", "--target", "i386-pc", loop], check=True) - subprocess.run(["qemu-img", "convert", "-O" "qcow2", "-c", image, filename], check=True) + subprocess.run(["qemu-img", "convert", "-O" "qcow2", "-c", image, f"{output_dir}/{filename}"], check=True) if __name__ == '__main__': args = json.load(sys.stdin)