diff options
author | Leah Rowe <leah@libreboot.org> | 2025-08-10 14:50:32 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-08-10 14:50:32 +0100 |
commit | 41945a222005d94e0e51adb1ba8ceb869b110bae (patch) | |
tree | dbd75d8eb6fbde99ff53ae087d4dfd739f685299 /config/grub | |
parent | d44c143846c15ba2032340db085f2ec31365182b (diff) |
tree.sh: Delete files *before* updating hashes
The current logic deletes old project files e.g. sources,
but *after* updating the project hash.
This means that if a deletion fails, and the directory
is still there (e.g. src/coreboot/default/) afterward, it's
now a tainted archive, yet the hash has been updated, so
subsequent runs of the build system will cause unknown
errors.
This patch fixes that, by first copying the new hash to
a temporary file. *Then*, deletions are handled, and the
final hash file is updated afterward.
The code is now a bit more bloated as a result, but this will
reduce the risk of tainted sources being handled under fault
conditions.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'config/grub')
0 files changed, 0 insertions, 0 deletions