Skip to content
Commit 8b2fd4e5 authored by Joshua Watt's avatar Joshua Watt Committed by Anuj Mittal
Browse files

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]

Signed-off-by: default avatarJoshua Watt <JPEWhacker@gmail.com>
Signed-off-by: default avatarRichard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 0b5e3b33)
Signed-off-by: default avatarAnuj Mittal <anuj.mittal@intel.com>
parent 79ec1d73
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment