assemblers/qemu: don't try to compress raw or vdi formats
qemu-img convert fails when passing `-c` to vdi or raw outputs.
This commit is contained in:
parent
2be0530047
commit
eab8cbff5e
1 changed files with 7 additions and 1 deletions
|
|
@ -98,7 +98,13 @@ def main(tree, output_dir, options, loop_client):
|
|||
mount(loop, mountpoint):
|
||||
subprocess.run(["cp", "-a", f"{tree}/.", mountpoint], check=True)
|
||||
|
||||
subprocess.run(["qemu-img", "convert", "-O", fmt, "-c", image, f"{output_dir}/{filename}"], check=True)
|
||||
extra_args = []
|
||||
|
||||
# raw and vdi don't suppport compression
|
||||
if fmt != "raw" and fmt != "vdi":
|
||||
extra_args.append("-c")
|
||||
|
||||
subprocess.run(["qemu-img", "convert", "-O", fmt, *extra_args, image, f"{output_dir}/{filename}"], check=True)
|
||||
|
||||
if __name__ == '__main__':
|
||||
args = json.load(sys.stdin)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue