summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic
diff options
context:
space:
mode:
authorNoor Ahsan <noor_ahsan@mentor.com>2015-12-23 15:50:35 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-07 13:40:16 +0000
commita3e26f9a7a90e69cf7912911f7e7434a17cdbf4c (patch)
tree2f403f9cbe7df2f5f074bf466dcdc44b4aebc872 /scripts/lib/wic
parentd6e0da41bf7ea3502ae629f3ee11e932224ce736 (diff)
downloadpoky-a3e26f9a7a90e69cf7912911f7e7434a17cdbf4c.tar.gz
wic: rawcopy: Copy source file to build folder
When a file is given using --sourceparams then wic directly use that file instead of copying them to build folder. At time of assembling it os.rename is called which renames all the files to name. In that process the original file is renamed. When image recipe is rebuilt then wic complains about missing file which was renamed in previous build. [YOCTO #8854] (From OE-Core rev: 33c52b1f2d39feb641465bf42e8b16d0ab22a316) 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>
Diffstat (limited to 'scripts/lib/wic')
-rw-r--r--scripts/lib/wic/plugins/source/rawcopy.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/lib/wic/plugins/source/rawcopy.py b/scripts/lib/wic/plugins/source/rawcopy.py
index f0691baa91..0472f536ba 100644
--- a/scripts/lib/wic/plugins/source/rawcopy.py
+++ b/scripts/lib/wic/plugins/source/rawcopy.py
@@ -67,13 +67,14 @@ class RawCopyPlugin(SourcePlugin):
67 return 67 return
68 68
69 src = os.path.join(bootimg_dir, source_params['file']) 69 src = os.path.join(bootimg_dir, source_params['file'])
70 dst = src 70 dst = os.path.join(cr_workdir, source_params['file'])
71 71
72 if 'skip' in source_params: 72 if 'skip' in source_params:
73 dst = os.path.join(cr_workdir, source_params['file'])
74 dd_cmd = "dd if=%s of=%s ibs=%s skip=1 conv=notrunc" % \ 73 dd_cmd = "dd if=%s of=%s ibs=%s skip=1 conv=notrunc" % \
75 (src, dst, source_params['skip']) 74 (src, dst, source_params['skip'])
76 exec_cmd(dd_cmd) 75 else:
76 dd_cmd = "cp %s %s" % (src, dst)
77 exec_cmd(dd_cmd)
77 78
78 # get the size in the right units for kickstart (kB) 79 # get the size in the right units for kickstart (kB)
79 du_cmd = "du -Lbks %s" % dst 80 du_cmd = "du -Lbks %s" % dst