[oe-commits] [openembedded-core] 11/11: wic: fix images build in parallel

git at git.openembedded.org git at git.openembedded.org
Fri Jan 17 23:34:57 UTC 2020


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 952c687018a8603549012114750faed85711832e
Author: Maxim Uvarov <maxim.uvarov at linaro.org>
AuthorDate: Sat Jan 18 00:46:12 2020 +0300

    wic: fix images build in parallel
    
    OE wic plugins create temporary file with the index of the line
    tmp file name. This causes race in case several builds run in time.
    If source_params['file'] is an absolute path, the cr_workdir prefix
    is not applied by os.path.join(). So instead it writes to a ".1"
    file next to the original image - this is outside the WORKDIR
    and at risk of collision.
    
    Signed-off-by: Maxim Uvarov <maxim.uvarov at linaro.org>
    Suggested-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
    Suggested-by: Paul Barker <pbarker at konsulko.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 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 82970ce..3c4997d 100644
--- a/scripts/lib/wic/plugins/source/rawcopy.py
+++ b/scripts/lib/wic/plugins/source/rawcopy.py
@@ -57,7 +57,7 @@ class RawCopyPlugin(SourcePlugin):
             raise WicError("No file specified")
 
         src = os.path.join(kernel_dir, source_params['file'])
-        dst = os.path.join(cr_workdir, "%s.%s" % (source_params['file'], part.lineno))
+        dst = os.path.join(cr_workdir, "%s.%s" % (os.path.basename(source_params['file']), part.lineno))
 
         if not os.path.exists(os.path.dirname(dst)):
             os.makedirs(os.path.dirname(dst))

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list