[oe-commits] [openembedded-core] 43/50: wic: fully implement 'wic cp'
git at git.openembedded.org
git at git.openembedded.org
Sun Jun 11 22:08:08 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 91f46e3e9eecbc0f959a41ec16a4793d7a8b5867
Author: Ed Bartosh <ed.bartosh at linux.intel.com>
AuthorDate: Thu Jun 8 19:13:00 2017 +0300
wic: fully implement 'wic cp'
Added implementation of Disk.copy method and wic_cp
function that copies files/directories to the vfat partition
of the partitioned image.
[YOCTO #11283]
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
scripts/lib/wic/engine.py | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index 6a4f55f..a48c4ad 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -310,6 +310,14 @@ class Disk:
self._get_part_image(pnum),
path))
+ def copy(self, src, pnum, path):
+ """Copy partition image into wic image."""
+ cmd = "{} -i {} -snop {} ::{}".format(self.mcopy,
+ self._get_part_image(pnum),
+ src, path)
+ exec_cmd(cmd)
+ self._put_part_image(pnum)
+
def wic_ls(args, native_sysroot):
"""List contents of partitioned image or vfat partition."""
disk = Disk(args.path.image, native_sysroot)
@@ -329,7 +337,8 @@ def wic_cp(args, native_sysroot):
Copy local file or directory to the vfat partition of
partitioned image.
"""
- pass
+ disk = Disk(args.dest.image, native_sysroot)
+ disk.copy(args.src, args.dest.part, args.dest.path)
def find_canned(scripts_path, file_name):
"""
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list