summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-07-01 11:05:39 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-06 17:25:48 +0100
commiteea30774b452cd7901b8eb2a61b437731c7a2718 (patch)
tree73308a0234e8567c95b17ed5e4cde2cf6fb32112 /scripts/lib/wic
parent250212eee607b36161d180784ecb3ba7e0da3b9a (diff)
downloadpoky-eea30774b452cd7901b8eb2a61b437731c7a2718.tar.gz
wic: rawcopy: make source filenames unique
Rawcopy plugin copies source files to build folder before using them to assemble result image. After assembling the image wic renames source files to <image>.p<partition number>. If the same source file is used in multiple partitions wic breaks trying to rename file that doesn't exist. Added <line number> suffix to the files when copying them to the build dir. This should make filename unique even if the same source file is used for multiple partitions. [YOCTO #9826] (From OE-Core rev: 6f7afd6f76c40e1b050e40bc4965cb5000df7088) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.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.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/wic/plugins/source/rawcopy.py b/scripts/lib/wic/plugins/source/rawcopy.py
index 0472f536ba..7ce0cc4154 100644
--- a/scripts/lib/wic/plugins/source/rawcopy.py
+++ b/scripts/lib/wic/plugins/source/rawcopy.py
@@ -67,7 +67,7 @@ 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 = os.path.join(cr_workdir, source_params['file']) 70 dst = os.path.join(cr_workdir, "%s.%s" % (source_params['file'], part.lineno))
71 71
72 if 'skip' in source_params: 72 if 'skip' in source_params:
73 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" % \