mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
runqemu: use "zstd -o" to preserve sparse images
wic images can be sparse. Using "zstd -o" preserves the sparse state of the image and should decrease decompression time. Suggested-by: Adrian Freihofer <adrian.freihofer@gmail.com> (From OE-Core rev: 27d156d85f13131ea4c5d766ddaa2d18b88d7577) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
5de44144cf
commit
b4eacbf7c1
@@ -448,8 +448,7 @@ class BaseConfig(object):
|
||||
if not shutil.which('zstd'):
|
||||
raise RunQemuError(f"'zstd' is required to decompress {self.rootfs} but was not found in PATH")
|
||||
try:
|
||||
with open(uncompressed_path, 'wb') as out_file:
|
||||
subprocess.check_call(['zstd', '-d', '-c', image_path], stdout=out_file)
|
||||
subprocess.check_call(['zstd', '-d', image_path, '-o', uncompressed_path])
|
||||
except subprocess.CalledProcessError as e:
|
||||
self.cleanup_files.append(uncompressed_path)
|
||||
raise RunQemuError(f"Failed to decompress {self.rootfs}: {e}")
|
||||
|
||||
Reference in New Issue
Block a user