[gnome-continuous-yocto/gnomeostree-3.28-rocko: 7610/8267] wic: implement ext fs support for 'wic cp'
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 7610/8267] wic: implement ext fs support for 'wic cp'
- Date: Sun, 17 Dec 2017 06:29:23 +0000 (UTC)
commit 9f90956967caca7be50e501b3843dfaf03d90943
Author: Ed Bartosh <ed bartosh linux intel com>
Date: Tue Sep 5 14:54:37 2017 +0300
wic: implement ext fs support for 'wic cp'
Implemented copying files to the ext partition
using debugfs tool.
(From OE-Core rev: 1a2bc70e6f85f414e7af48489e24c09ff335486d)
Signed-off-by: Ed Bartosh <ed bartosh linux intel com>
Signed-off-by: Ross Burton <ross burton intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
scripts/lib/wic/engine.py | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index c6a63f2..9ebd93a 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -325,10 +325,15 @@ class Disk:
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)
+ if self.partitions[pnum].fstype.startswith('ext'):
+ cmd = "echo -e 'cd {}\nwrite {} {}' | {} -w {}".\
+ format(path, src, os.path.basename(src),
+ self.debugfs, self._get_part_image(pnum))
+ else: # fat
+ cmd = "{} -i {} -snop {} ::{}".format(self.mcopy,
+ self._get_part_image(pnum),
+ src, path)
+ exec_cmd(cmd, as_shell=True)
self._put_part_image(pnum)
def remove(self, pnum, path):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]