]> code.ossystems Code Review - openembedded-core.git/commitdiff
wic: rawcopy: make source filenames unique
authorEd Bartosh <ed.bartosh@linux.intel.com>
Thu, 30 Jun 2016 16:29:18 +0000 (19:29 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 21 Jul 2016 06:45:01 +0000 (07:45 +0100)
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]

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>
scripts/lib/wic/plugins/source/rawcopy.py

index ba014b0714b318824227aa688641b602130b9c5b..e0b11f95adb5a2c55fdc3b5e3ff1f4b463e2be9d 100644 (file)
@@ -68,7 +68,7 @@ class RawCopyPlugin(SourcePlugin):
             return
 
         src = os.path.join(bootimg_dir, source_params['file'])
-        dst = os.path.join(cr_workdir, source_params['file'])
+        dst = os.path.join(cr_workdir, "%s.%s" % (source_params['file'], part.lineno))
 
         if 'skip' in source_params:
             sparse_copy(src, dst, skip=source_params['skip'])