[OE-core] [RFC] rawcopy.py: Copy source file in image creation build folder

Ahsan, Noor Noor_Ahsan at mentor.com
Thu Oct 22 10:14:02 UTC 2015



-----Original Message-----
From: Ahsan, Noor 
Sent: Wednesday, October 21, 2015 9:04 PM
To: openembedded-core at lists.openembedded.org
Cc: Ahsan, Noor
Subject: [RFC] rawcopy.py: Copy source file in image creation build folder

From: Noor <noor_ahsan at mentor.com>

* When a file is given using --sourceparams then wic directly use that file
  instead of copying them to build folder. At time of assmebling it os.rename
  is called which rename all the files to name. In that process the original
  file get renamed. When image recipe is rebuilt then wic complains about
  missing file which renamed in previous build.

Signed-off-by: Noor Ahsan <noor_ahsan at mentor.com>
---
 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..f17da27 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'])
+            dd_cmd = "cp src dst"
+            exec_cmd(dd_cmd)


dd_cmd will be replaced by cp_cmd but I need review of all impact of this so that I can send proper patch.


         # get the size in the right units for kickstart (kB)
         du_cmd = "du -Lbks %s" % dst
-- 
1.7.9.5




More information about the Openembedded-core mailing list