summaryrefslogtreecommitdiffstats
path: root/meta/classes/buildhistory.bbclass
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-01-27 14:50:53 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-30 11:37:00 +0000
commit70814586bb11c8f1aeb4c991f44cd52542159a91 (patch)
tree5d07a150b3131b1b502378b0d8fe27dfea3d47ab /meta/classes/buildhistory.bbclass
parentd74325e22ed81e49eec63335fd0f4b789f9dfc21 (diff)
downloadpoky-70814586bb11c8f1aeb4c991f44cd52542159a91.tar.gz
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] (From OE-Core rev: a5e931e0b1d941cc938fe2f49625c54b07fab0ce) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/buildhistory.bbclass')
-rw-r--r--meta/classes/buildhistory.bbclass2
1 files changed, 1 insertions, 1 deletions
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
684 684
685 ( cd ${BUILDHISTORY_DIR}/ 685 ( cd ${BUILDHISTORY_DIR}/
686 # Initialise the repo if necessary 686 # Initialise the repo if necessary
687 if [ ! -d .git ] ; then 687 if [ ! -e .git ] ; then
688 git init -q 688 git init -q
689 else 689 else
690 git tag -f build-minus-3 build-minus-2 > /dev/null 2>&1 || true 690 git tag -f build-minus-3 build-minus-2 > /dev/null 2>&1 || true