summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/kernel.bbclass12
1 files changed, 4 insertions, 8 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 0eadd3efb8..a724645466 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -294,14 +294,10 @@ kernel_do_compile() {
294 # kernel sources do not use do_unpack, so SOURCE_DATE_EPOCH may not 294 # kernel sources do not use do_unpack, so SOURCE_DATE_EPOCH may not
295 # be set.... 295 # be set....
296 if [ "${SOURCE_DATE_EPOCH}" = "" -o "${SOURCE_DATE_EPOCH}" = "0" ]; then 296 if [ "${SOURCE_DATE_EPOCH}" = "" -o "${SOURCE_DATE_EPOCH}" = "0" ]; then
297 olddir=`pwd` 297 # The source directory is not necessarily a git repository, so we
298 cd ${S} 298 # specify the git-dir to ensure that git does not query a
299 SOURCE_DATE_EPOCH=`git log -1 --pretty=%ct` 299 # repository in any parent directory.
300 # git repo not guaranteed, so fall back to REPRODUCIBLE_TIMESTAMP_ROOTFS 300 SOURCE_DATE_EPOCH=`git --git-dir="${S}/.git" log -1 --pretty=%ct 2>/dev/null || echo "${REPRODUCIBLE_TIMESTAMP_ROOTFS}"`
301 if [ $? -ne 0 ]; then
302 SOURCE_DATE_EPOCH=${REPRODUCIBLE_TIMESTAMP_ROOTFS}
303 fi
304 cd $olddir
305 fi 301 fi
306 302
307 ts=`LC_ALL=C date -d @$SOURCE_DATE_EPOCH` 303 ts=`LC_ALL=C date -d @$SOURCE_DATE_EPOCH`