From: Ed Bartosh Date: Thu, 30 Jun 2016 16:29:18 +0000 (+0300) Subject: wic: rawcopy: make source filenames unique X-Git-Tag: uninative-1.3~233 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=43a809bfe99024083b4ab4eb9895b084c9c4fa80;p=openembedded-core.git 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 .p. If the same source file is used in multiple partitions wic breaks trying to rename file that doesn't exist. Added 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 Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- diff --git a/scripts/lib/wic/plugins/source/rawcopy.py b/scripts/lib/wic/plugins/source/rawcopy.py index ba014b0714..e0b11f95ad 100644 --- a/scripts/lib/wic/plugins/source/rawcopy.py +++ b/scripts/lib/wic/plugins/source/rawcopy.py @@ -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'])