mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00:00
reproducible: Improve SOURCE_DATE_EPOCH_FALLBACK handling
Ensure the fallback value if used is written to the SDE file and hence stored in sstate, reducing any confusion within the code over '0' values. Bump the HASHEQUIV_VERSION since we've had a ton of trouble with ensuring this rolls out correctly on the autobuilder so others may too, take a clean slate for it. (From OE-Core rev: 1f218351c2ef702c76b1d1e793a624e1a4f5079b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 53ffffa32b76330835287dfc05d4e4796841af08) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -90,8 +90,12 @@ def get_source_date_epoch_from_youngest_file(d, sourcedir):
|
||||
bb.debug(1, "Newest file found: %s" % newest_file)
|
||||
return source_date_epoch
|
||||
|
||||
def fixed_source_date_epoch():
|
||||
def fixed_source_date_epoch(d):
|
||||
bb.debug(1, "No tarball or git repo found to determine SOURCE_DATE_EPOCH")
|
||||
source_date_epoch = d.getVar('SOURCE_DATE_EPOCH_FALLBACK')
|
||||
if source_date_epoch:
|
||||
bb.debug(1, "Using SOURCE_DATE_EPOCH_FALLBACK")
|
||||
return int(source_date_epoch)
|
||||
return 0
|
||||
|
||||
def get_source_date_epoch(d, sourcedir):
|
||||
@@ -99,6 +103,6 @@ def get_source_date_epoch(d, sourcedir):
|
||||
get_source_date_epoch_from_git(d, sourcedir) or
|
||||
get_source_date_epoch_from_known_files(d, sourcedir) or
|
||||
get_source_date_epoch_from_youngest_file(d, sourcedir) or
|
||||
fixed_source_date_epoch() # Last resort
|
||||
fixed_source_date_epoch(d) # Last resort
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user