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 <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
( 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