summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-06-13 14:22:06 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-14 10:18:21 +0100
commit7a7e6635e2e2ddfff2bca58c860634b7a199b0df (patch)
tree77604db9ed5183dfa35611f5e34a49ead5a5003d
parente6d709a6382e4b913612f597e66ad07b0e351d5f (diff)
downloadopenembedded-core-contrib-7a7e6635e2e2ddfff2bca58c860634b7a199b0df.tar.gz
openembedded-core-contrib-7a7e6635e2e2ddfff2bca58c860634b7a199b0df.tar.bz2
openembedded-core-contrib-7a7e6635e2e2ddfff2bca58c860634b7a199b0df.zip
wic: add Disk._put_part_image method
This method copies partition image into the wic image. It will be used in 'wic cp' and 'wic rm' subcommands to copy changed partition back into wic image. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--scripts/lib/wic/engine.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index f24fb9aa8a..6a4f55f348 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -300,6 +300,11 @@ class Disk:
return self._partimages[pnum]
+ def _put_part_image(self, pnum):
+ """Put partition image into partitioned image."""
+ sparse_copy(self._partimages[pnum], self.imagepath,
+ seek=self.partitions[pnum].start)
+
def dir(self, pnum, path):
return exec_cmd("{} -i {} ::{}".format(self.mdir,
self._get_part_image(pnum),