]> code.ossystems Code Review - openembedded-core.git/commitdiff
wic/utils/partitionedfs.py: assemble .wic images as sparse files
authorJoshua Lock <joshua.lock@collabora.co.uk>
Fri, 8 Apr 2016 09:14:18 +0000 (10:14 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 9 Apr 2016 06:54:29 +0000 (07:54 +0100)
The individual partitions created by wic are sparse but without
this change the assembled image is written as one (potentially
very) large file.

Preserve sparseness in the assembled image by passing the sparse
conversion symbol.

[YOCTO #9099]

Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/wic/utils/partitionedfs.py

index 5a103bbc7e80f01d8bf482e0860c497552582410..3e2b420875f17571d145c55a87916011a2fa36bd 100644 (file)
@@ -340,7 +340,7 @@ class Image(object):
             source = part['source_file']
             if source:
                 # install source_file contents into a partition
-                cmd = "dd if=%s of=%s bs=%d seek=%d count=%d conv=notrunc" % \
+                cmd = "dd if=%s of=%s bs=%d seek=%d count=%d conv=notrunc,sparse" % \
                       (source, image_file, self.sector_size,
                        part['start'], part['size'])
                 exec_cmd(cmd)