]> code.ossystems Code Review - openembedded-core.git/commit
sstate: Ensure SDE is accounted for in package task timestamps
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 13 Sep 2021 22:56:16 +0000 (23:56 +0100)
committerSteve Sakoman <steve@sakoman.com>
Tue, 9 Nov 2021 22:18:24 +0000 (12:18 -1000)
commit06b8f2a5a24be1a87f0eaf29fdba719ebe3bb06e
tree0050fa014fb09db603384050c3b1ee7463609687
parente7d94a9cc5ab1b2c5d160fd06d643a4bc3409d26
sstate: Ensure SDE is accounted for in package task timestamps

When creating packages we build them with --clamp-mtime and use
SOURCE_DATE_EPOCH as the maximum mtime. This makes the end packages
reproducible. The data stored in sstate for do_package and the package
task doesn't benefit from this though and have varying timestamps.
This means their outhash varies and means hash equivalance isn't
effective at all and doesn't work as intended/desired.

We could create the sstate archives with the same clamping however
that would lead to different results depending on whether a task was
installed from sstate or not. Making that differ is a path to madness.
It also wouldn't fix the outhash of the task to be determninistic
without clamping of the date in the hash calculation code.

Instead, iterate over the files in sstate output and clamp them at
the code level. This isn't ideal but does make the file timestamps
determnistic everywhere and means we don't have to change the hash
calculation code.

This issue can be clearly seen looking at the do_package outhash for
a recipe which you then re-run the package task for after adding
something like whitespace to the install task. The outhash shouldn't
change but currently does.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit c3b3cc4745811b48b9193f83889946b2e1788932)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/classes/sstate.bbclass