diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/reproducible_build.bbclass | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/classes/reproducible_build.bbclass b/meta/classes/reproducible_build.bbclass index 0eb696ac78..a0fd4d656b 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): | |||
128 | bb.debug(1, "Newest file found: %s" % newest_file) | 128 | bb.debug(1, "Newest file found: %s" % newest_file) |
129 | return source_date_epoch | 129 | return source_date_epoch |
130 | 130 | ||
131 | def fixed_source_date_epoch(): | ||
132 | bb.debug(1, "No tarball or git repo found to determine SOURCE_DATE_EPOCH") | ||
133 | return 0 | ||
134 | |||
131 | python do_create_source_date_epoch_stamp() { | 135 | python do_create_source_date_epoch_stamp() { |
132 | epochfile = d.getVar('SDE_FILE') | 136 | epochfile = d.getVar('SDE_FILE') |
133 | if os.path.isfile(epochfile): | 137 | if os.path.isfile(epochfile): |
@@ -139,11 +143,8 @@ python do_create_source_date_epoch_stamp() { | |||
139 | get_source_date_epoch_from_git(d, sourcedir) or | 143 | get_source_date_epoch_from_git(d, sourcedir) or |
140 | get_source_date_epoch_from_known_files(d, sourcedir) or | 144 | get_source_date_epoch_from_known_files(d, sourcedir) or |
141 | get_source_date_epoch_from_youngest_file(d, sourcedir) or | 145 | get_source_date_epoch_from_youngest_file(d, sourcedir) or |
142 | 0 # Last resort | 146 | fixed_source_date_epoch() # Last resort |
143 | ) | 147 | ) |
144 | if source_date_epoch == 0: | ||
145 | # empty folder, not a single file ... | ||
146 | bb.debug(1, "No files found to determine SOURCE_DATE_EPOCH") | ||
147 | 148 | ||
148 | bb.debug(1, "SOURCE_DATE_EPOCH: %d" % source_date_epoch) | 149 | bb.debug(1, "SOURCE_DATE_EPOCH: %d" % source_date_epoch) |
149 | bb.utils.mkdirhier(d.getVar('SDE_DIR')) | 150 | bb.utils.mkdirhier(d.getVar('SDE_DIR')) |