diff options
-rw-r--r-- | meta/classes/image.bbclass | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index c0a2714288..5ae0910aa6 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass | |||
@@ -650,7 +650,10 @@ POPULATE_SDK_PRE_TARGET_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usr | |||
650 | reproducible_final_image_task () { | 650 | reproducible_final_image_task () { |
651 | if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then | 651 | if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then |
652 | if [ "$REPRODUCIBLE_TIMESTAMP_ROOTFS" = "" ]; then | 652 | if [ "$REPRODUCIBLE_TIMESTAMP_ROOTFS" = "" ]; then |
653 | REPRODUCIBLE_TIMESTAMP_ROOTFS=`git -C "${COREBASE}" log -1 --pretty=%ct` | 653 | REPRODUCIBLE_TIMESTAMP_ROOTFS=`git -C "${COREBASE}" log -1 --pretty=%ct 2>/dev/null` || true |
654 | if [ "${REPRODUCIBLE_TIMESTAMP_ROOTFS}" = "" ]; then | ||
655 | REPRODUCIBLE_TIMESTAMP_ROOTFS=`stat -c%Y ${@bb.utils.which(d.getVar("BBPATH"), "conf/bitbake.conf")}` | ||
656 | fi | ||
654 | fi | 657 | fi |
655 | # Set mtime of all files to a reproducible value | 658 | # Set mtime of all files to a reproducible value |
656 | bbnote "reproducible_final_image_task: mtime set to $REPRODUCIBLE_TIMESTAMP_ROOTFS" | 659 | bbnote "reproducible_final_image_task: mtime set to $REPRODUCIBLE_TIMESTAMP_ROOTFS" |