From: Noor <[email protected]>

* In wks file when a file name is given using --sourceparams then wic directly
  use that file instead of copying them to build folder. "assemble" function in
  partitionedfs.py calls os.rename which renames the file given in 
--sourceparams.
  When image recipe is rebuilt then wic complains about missing file which was
  renamed in previous build.

Signed-off-by: Noor Ahsan <[email protected]>
---
 scripts/lib/wic/plugins/source/rawcopy.py |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/lib/wic/plugins/source/rawcopy.py 
b/scripts/lib/wic/plugins/source/rawcopy.py
index f0691ba..8481168 100644
--- a/scripts/lib/wic/plugins/source/rawcopy.py
+++ b/scripts/lib/wic/plugins/source/rawcopy.py
@@ -74,6 +74,10 @@ class RawCopyPlugin(SourcePlugin):
             dd_cmd = "dd if=%s of=%s ibs=%s skip=1 conv=notrunc" % \
                     (src, dst, source_params['skip'])
             exec_cmd(dd_cmd)
+        else:
+             dst = os.path.join(cr_workdir, source_params['file'])
+             cp_cmd = "cp %s %s" % (src, dst)
+             exec_cmd(cp_cmd)
 
         # get the size in the right units for kickstart (kB)
         du_cmd = "du -Lbks %s" % dst
-- 
1.7.9.5

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to