summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorAlex Kiernan <alex.kiernan@gmail.com>2018-06-26 12:08:55 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-28 09:22:35 +0100
commit3c466731007e8a59d9c76b9dcf9ccd3e55573408 (patch)
tree8ca3be9d8ddfdd93d059428197fb25ceca938733 /meta/classes
parent9fa6e7d487030e3c3340f6ad19b56b91f3ed4fa0 (diff)
downloadpoky-3c466731007e8a59d9c76b9dcf9ccd3e55573408.tar.gz
image: Set COREBASE as the git directory for timestamp
When REPRODUCIBLE_TIMESTAMP_ROOTFS is unset and we want to parse one from git, use COREBASE as the base for the git command so we have a known repository which we're using. Without this the build may fail if the current directory is not part of a git repository. (From OE-Core rev: 1c2197f96d69547e10b74dc722d9a569d9a2b2b6) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/image.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 8ef06c0fb0..2e880242d7 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -651,7 +651,7 @@ POPULATE_SDK_PRE_TARGET_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usr
651reproducible_final_image_task () { 651reproducible_final_image_task () {
652 if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then 652 if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
653 if [ "$REPRODUCIBLE_TIMESTAMP_ROOTFS" = "" ]; then 653 if [ "$REPRODUCIBLE_TIMESTAMP_ROOTFS" = "" ]; then
654 REPRODUCIBLE_TIMESTAMP_ROOTFS=`git log -1 --pretty=%ct` 654 REPRODUCIBLE_TIMESTAMP_ROOTFS=`git -C "${COREBASE}" log -1 --pretty=%ct`
655 fi 655 fi
656 # Set mtime of all files to a reproducible value 656 # Set mtime of all files to a reproducible value
657 bbnote "reproducible_final_image_task: mtime set to $REPRODUCIBLE_TIMESTAMP_ROOTFS" 657 bbnote "reproducible_final_image_task: mtime set to $REPRODUCIBLE_TIMESTAMP_ROOTFS"