From a5e931e0b1d941cc938fe2f49625c54b07fab0ce Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Wed, 27 Jan 2016 14:50:53 +0200 Subject: buildhistory: fix the check for existence of a git repo Previously, in order to determine the existence of an already initialized Git repository we checked if a directory named '.git' was present in the buildhistory dir. However, e.g. in the case of git submodules '.git' may also be a regular file referencing some other location which was causing unwanted behavior. This patch changes buildhistory.bbclass to check for any file named '.git' which fixes these problems. [YOCTO #8911] Signed-off-by: Markus Lehtonen Signed-off-by: Ross Burton --- meta/classes/buildhistory.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta/classes/buildhistory.bbclass') diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index 9f1744293a..3c4647ac7b 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass @@ -684,7 +684,7 @@ END ( cd ${BUILDHISTORY_DIR}/ # Initialise the repo if necessary - if [ ! -d .git ] ; then + if [ ! -e .git ] ; then git init -q else git tag -f build-minus-3 build-minus-2 > /dev/null 2>&1 || true -- cgit 1.2.3-korg