Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] wic/utils/partitionedfs.py: assemble .wic images as sparse files
@ 2015-12-16 16:33 Joshua Lock
  2015-12-17 12:21 ` Ed Bartosh
  2015-12-17 16:09 ` [PATCH] oeqa/selftest/wic: add test case for sparse images Joshua Lock
  0 siblings, 2 replies; 10+ messages in thread
From: Joshua Lock @ 2015-12-16 16:33 UTC (permalink / raw)
  To: openembedded-core

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.

Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
---
 scripts/lib/wic/utils/partitionedfs.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py
index 5a103bb..3e2b420 100644
--- a/scripts/lib/wic/utils/partitionedfs.py
+++ b/scripts/lib/wic/utils/partitionedfs.py
@@ -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)
-- 
2.5.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-12-30 10:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-16 16:33 [PATCH] wic/utils/partitionedfs.py: assemble .wic images as sparse files Joshua Lock
2015-12-17 12:21 ` Ed Bartosh
2015-12-17 13:19   ` Joshua Lock
2015-12-17 13:23     ` Burton, Ross
2015-12-17 13:53     ` Ed Bartosh
2015-12-17 16:09 ` [PATCH] oeqa/selftest/wic: add test case for sparse images Joshua Lock
2015-12-17 16:21   ` Burton, Ross
2015-12-17 16:52     ` Joshua Lock
2015-12-17 19:43   ` [[PATCH v2] " Joshua Lock
2015-12-30  9:53     ` Ed Bartosh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox