summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-02-22 22:12:53 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-02-24 00:19:38 +0000
commitc4baddc0d098562df6b197f32f9bf5f9f6a9bbaa (patch)
treec00a309c18828e43d580d0884919198a8e2c93d3 /meta/lib/oe
parent7e9c2f33d4ea9f6449dd56d19ff4522a9ddc2df1 (diff)
downloadpoky-c4baddc0d098562df6b197f32f9bf5f9f6a9bbaa.tar.gz
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: 53ffffa32b76330835287dfc05d4e4796841af08) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r--meta/lib/oe/reproducible.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/lib/oe/reproducible.py b/meta/lib/oe/reproducible.py
index 0fb02ccdb0..204b9bd734 100644
--- a/meta/lib/oe/reproducible.py
+++ b/meta/lib/oe/reproducible.py
@@ -90,8 +90,12 @@ def get_source_date_epoch_from_youngest_file(d, sourcedir):
90 bb.debug(1, "Newest file found: %s" % newest_file) 90 bb.debug(1, "Newest file found: %s" % newest_file)
91 return source_date_epoch 91 return source_date_epoch
92 92
93def fixed_source_date_epoch(): 93def fixed_source_date_epoch(d):
94 bb.debug(1, "No tarball or git repo found to determine SOURCE_DATE_EPOCH") 94 bb.debug(1, "No tarball or git repo found to determine SOURCE_DATE_EPOCH")
95 source_date_epoch = d.getVar('SOURCE_DATE_EPOCH_FALLBACK')
96 if source_date_epoch:
97 bb.debug(1, "Using SOURCE_DATE_EPOCH_FALLBACK")
98 return int(source_date_epoch)
95 return 0 99 return 0
96 100
97def get_source_date_epoch(d, sourcedir): 101def get_source_date_epoch(d, sourcedir):
@@ -99,6 +103,6 @@ def get_source_date_epoch(d, sourcedir):
99 get_source_date_epoch_from_git(d, sourcedir) or 103 get_source_date_epoch_from_git(d, sourcedir) or
100 get_source_date_epoch_from_known_files(d, sourcedir) or 104 get_source_date_epoch_from_known_files(d, sourcedir) or
101 get_source_date_epoch_from_youngest_file(d, sourcedir) or 105 get_source_date_epoch_from_youngest_file(d, sourcedir) or
102 fixed_source_date_epoch() # Last resort 106 fixed_source_date_epoch(d) # Last resort
103 ) 107 )
104 108