diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2017-06-13 14:22:06 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-14 10:18:29 +0100 |
commit | 0a84187b86f4430aef2bcbfccc656a07b8ba89a6 (patch) | |
tree | 6a4ebb8fc921ad462f288f2af6caa4ac9479dc19 /scripts/lib | |
parent | d5e3c917032a59bbe93969ed0bbb4659089dfec4 (diff) | |
download | poky-0a84187b86f4430aef2bcbfccc656a07b8ba89a6.tar.gz |
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.
(From OE-Core rev: 7a7e6635e2e2ddfff2bca58c860634b7a199b0df)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r-- | scripts/lib/wic/engine.py | 5 |
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: | |||
300 | 300 | ||
301 | return self._partimages[pnum] | 301 | return self._partimages[pnum] |
302 | 302 | ||
303 | def _put_part_image(self, pnum): | ||
304 | """Put partition image into partitioned image.""" | ||
305 | sparse_copy(self._partimages[pnum], self.imagepath, | ||
306 | seek=self.partitions[pnum].start) | ||
307 | |||
303 | def dir(self, pnum, path): | 308 | def dir(self, pnum, path): |
304 | return exec_cmd("{} -i {} ::{}".format(self.mdir, | 309 | return exec_cmd("{} -i {} ::{}".format(self.mdir, |
305 | self._get_part_image(pnum), | 310 | self._get_part_image(pnum), |