summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAlex Kiernan <alex.kiernan@gmail.com>2018-06-26 12:08:56 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-28 09:22:35 +0100
commit8d33b69ed02b5ee8ae230107929c1e950ed34220 (patch)
treef2415427e0228038fbf574ae408672fb18666825 /meta
parent3c466731007e8a59d9c76b9dcf9ccd3e55573408 (diff)
downloadpoky-8d33b69ed02b5ee8ae230107929c1e950ed34220.tar.gz
kernel: Set SOURCE_DATE_EPOCH to kernel git timestamp if not set
If SOURCE_DATE_EPOCH is unset (in addition to the existing "0" behaviour) parse out the top most commit timestamp from the kernel tree to use as the timestamp. (From OE-Core rev: 2f0dd67a5a8d4269f5155004d532d8fa972b3223) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/kernel.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 972ac52814..3213b932bf 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -288,7 +288,7 @@ kernel_do_compile() {
288 if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then 288 if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
289 # kernel sources do not use do_unpack, so SOURCE_DATE_EPOCH may not 289 # kernel sources do not use do_unpack, so SOURCE_DATE_EPOCH may not
290 # be set.... 290 # be set....
291 if [ "$SOURCE_DATE_EPOCH" = "0" ]; then 291 if [ "${SOURCE_DATE_EPOCH}" = "" -o "${SOURCE_DATE_EPOCH}" = "0" ]; then
292 olddir=`pwd` 292 olddir=`pwd`
293 cd ${S} 293 cd ${S}
294 SOURCE_DATE_EPOCH=`git log -1 --pretty=%ct` 294 SOURCE_DATE_EPOCH=`git log -1 --pretty=%ct`