diff options
author | Maxim Uvarov <maxim.uvarov@linaro.org> | 2020-01-18 00:46:12 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-01-19 13:24:39 +0000 |
commit | 8290a50fe27b938fc96c1b51c08cf3f3cb539848 (patch) | |
tree | 08c90de08d8569dcf411a8225062405840859ae8 /scripts/lib/wic | |
parent | 247c50df6144bf6ce44686f442ff6924db715d07 (diff) | |
download | poky-8290a50fe27b938fc96c1b51c08cf3f3cb539848.tar.gz |
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.
(From OE-Core rev: c68d8a37ba4348fe1c0e75c63b5668187d326ec2)
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Suggested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Suggested-by: Paul Barker <pbarker@konsulko.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.py | 2 |
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 82970ce51b..3c4997d8ba 100644 --- a/scripts/lib/wic/plugins/source/rawcopy.py +++ b/scripts/lib/wic/plugins/source/rawcopy.py | |||
@@ -57,7 +57,7 @@ class RawCopyPlugin(SourcePlugin): | |||
57 | raise WicError("No file specified") | 57 | raise WicError("No file specified") |
58 | 58 | ||
59 | src = os.path.join(kernel_dir, source_params['file']) | 59 | src = os.path.join(kernel_dir, source_params['file']) |
60 | dst = os.path.join(cr_workdir, "%s.%s" % (source_params['file'], part.lineno)) | 60 | dst = os.path.join(cr_workdir, "%s.%s" % (os.path.basename(source_params['file']), part.lineno)) |
61 | 61 | ||
62 | if not os.path.exists(os.path.dirname(dst)): | 62 | if not os.path.exists(os.path.dirname(dst)): |
63 | os.makedirs(os.path.dirname(dst)) | 63 | os.makedirs(os.path.dirname(dst)) |