aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/reproducible_build.bbclass
diff options
context:
space:
mode:
authorDouglas Royds <douglas.royds@taitradio.com>2018-11-23 09:41:56 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-08 20:12:01 +0000
commit98b7d22ed563efdf58beba1ba65270b731673103 (patch)
tree2d16263a4db58f89fd31194943becb0b02ff7729 /meta/classes/reproducible_build.bbclass
parent763398b87c257ab672430bedd01004b9317d02b2 (diff)
downloadopenembedded-core-contrib-98b7d22ed563efdf58beba1ba65270b731673103.tar.gz
reproducible: Refactor: Break out fixed_source_date_epoch() function
(From OE-Core rev: 4eb6def4fe82959c2a348142b9eada27d3354aef) Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta/classes/reproducible_build.bbclass')
-rw-r--r--meta/classes/reproducible_build.bbclass9
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/classes/reproducible_build.bbclass b/meta/classes/reproducible_build.bbclass
index 0eb696ac78f..a0fd4d656bf 100644
--- a/meta/classes/reproducible_build.bbclass
+++ b/meta/classes/reproducible_build.bbclass
@@ -128,6 +128,10 @@ 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():
+ bb.debug(1, "No tarball or git repo found to determine SOURCE_DATE_EPOCH")
+ return 0
+
python do_create_source_date_epoch_stamp() {
epochfile = d.getVar('SDE_FILE')
if os.path.isfile(epochfile):
@@ -139,11 +143,8 @@ python do_create_source_date_epoch_stamp() {
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
- 0 # Last resort
+ fixed_source_date_epoch() # Last resort
)
- if source_date_epoch == 0:
- # empty folder, not a single file ...
- bb.debug(1, "No files found to determine SOURCE_DATE_EPOCH")
bb.debug(1, "SOURCE_DATE_EPOCH: %d" % source_date_epoch)
bb.utils.mkdirhier(d.getVar('SDE_DIR'))