[oe-commits] [openembedded-core] 03/10: kernel: Set SOURCE_DATE_EPOCH to kernel git timestamp if not set

git at git.openembedded.org git at git.openembedded.org
Thu Jun 28 08:23:34 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 2f0dd67a5a8d4269f5155004d532d8fa972b3223
Author: Alex Kiernan <alex.kiernan at gmail.com>
AuthorDate: Tue Jun 26 12:08:56 2018 +0000

    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.
    
    Signed-off-by: Alex Kiernan <alex.kiernan at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/kernel.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 972ac52..3213b93 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -288,7 +288,7 @@ kernel_do_compile() {
 	if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
 		# kernel sources do not use do_unpack, so SOURCE_DATE_EPOCH may not
 		# be set....
-		if [ "$SOURCE_DATE_EPOCH" = "0" ]; then
+		if [ "${SOURCE_DATE_EPOCH}" = "" -o "${SOURCE_DATE_EPOCH}" = "0" ]; then
 			olddir=`pwd`
 			cd ${S}
 			SOURCE_DATE_EPOCH=`git log  -1 --pretty=%ct`

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list