[OE-core] [krogoth][wic][PATCH] wic: rawcopy: make source filenames unique

Fabio Berton fabio.berton at ossystems.com.br
Wed Jul 6 12:38:31 UTC 2016


Hi Ed,

This patch was already tested, can be applied to krogoth?

Regards,

Fabio

On Fri, Jul 1, 2016 at 5:05 AM, Ed Bartosh <ed.bartosh at linux.intel.com>
wrote:

> 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 at linux.intel.com>
> ---
>  scripts/lib/wic/plugins/source/rawcopy.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/lib/wic/plugins/source/rawcopy.py
> b/scripts/lib/wic/plugins/source/rawcopy.py
> index 0472f53..7ce0cc4 100644
> --- a/scripts/lib/wic/plugins/source/rawcopy.py
> +++ b/scripts/lib/wic/plugins/source/rawcopy.py
> @@ -67,7 +67,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:
>              dd_cmd = "dd if=%s of=%s ibs=%s skip=1 conv=notrunc" % \
> --
> 2.1.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20160706/f66d4caf/attachment-0002.html>


More information about the Openembedded-core mailing list