diff options
author | Joshua Watt <JPEWhacker@gmail.com> | 2021-06-01 21:36:48 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-29 14:28:34 +0100 |
commit | cf167fa2735c85314dc394c94d0afd1686f6107d (patch) | |
tree | 317e80d3212e1b218c7bcde9809411d4f11847e2 /meta/lib/oeqa | |
parent | 0e6f0e2c6776afde1e9a2f3e3474e4d24dd24f65 (diff) | |
download | poky-cf167fa2735c85314dc394c94d0afd1686f6107d.tar.gz |
classes/reproducible_build: Use atomic rename for SDE file
If an existing source date epoch file was found during do_unpack, it was
deleted and a new one would be written in its place. This causes a race
with check-before-use code in get_source_date_epoch_value. Resolve the
problem by making do_unpack write the new source date epoch to a
temporary file, then do an atomic rename to ensure it's always present,
and change the check-before-use code to use a EAFP exception instead of
checking for file existence.
[YOCTO #14384]
(From OE-Core rev: b98d37da1554f524bd5b16287731d7b34945e92d)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 0b5e3b33187bf78a2d62cc886463e4b27d6bd228)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
0 files changed, 0 insertions, 0 deletions