<div dir="ltr"><div dir="ltr"><br clear="all"></div><div>Please disregard. V2 with (hopefully) fixed title is on the way.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 8, 2019 at 12:14 AM Leonardo Augusto <<a href="mailto:leobsd@gmail.com">leobsd@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">In this particular case, "echo -e 'cd {}'" is interpreted<br>
as "-e cd {}", which causes the first line of the command<br>
to fail, and causing cp to always place the source file<br>
in the filesystem's root.<br>
<br>
This issue only affects "wic cp" for ext* filesystems.<br>
<br>
[1] <a href="https://docs.python.org/2/library/subprocess.html" rel="noreferrer" target="_blank">https://docs.python.org/2/library/subprocess.html</a><br>
[2] <a href="https://docs.python.org/3/library/subprocess.html" rel="noreferrer" target="_blank">https://docs.python.org/3/library/subprocess.html</a><br>
[3] <a href="http://pubs.opengroup.org/onlinepubs/9699919799" rel="noreferrer" target="_blank">http://pubs.opengroup.org/onlinepubs/9699919799</a><br>
<br>
Signed-off-by: Leonardo Augusto <<a href="mailto:leobsd@gmail.com" target="_blank">leobsd@gmail.com</a>><br>
---<br>
scripts/lib/wic/engine.py | 2 +-<br>
1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py<br>
index 4662c665c0..b4be796752 100644<br>
--- a/scripts/lib/wic/engine.py<br>
+++ b/scripts/lib/wic/engine.py<br>
@@ -331,7 +331,7 @@ class Disk:<br>
def copy(self, src, pnum, path):<br>
"""Copy partition image into wic image."""<br>
if self.partitions[pnum].fstype.startswith('ext'):<br>
- cmd = "echo -e 'cd {}\nwrite {} {}' | {} -w {}".\<br>
+ cmd = "echo 'cd {}\nwrite {} {}' | {} -w {}".\<br>
format(path, src, os.path.basename(src),<br>
self.debugfs, self._get_part_image(pnum))<br>
else: # fat<br>
-- <br>
2.17.1<br>
<br>
</blockquote></div></div>