aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/buildhistory.bbclass9
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 211dcf18b5..777aabc55d 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -581,6 +581,15 @@ END
git tag -f build-minus-2 build-minus-1 > /dev/null 2>&1 || true
git tag -f build-minus-1 > /dev/null 2>&1 || true
fi
+ # If the user hasn't set up their name/email, set some defaults
+ # just for this repo (otherwise the commit will fail with older
+ # versions of git)
+ if ! git config user.email > /dev/null ; then
+ git config --local user.email "buildhistory@${DISTRO}"
+ fi
+ if ! git config user.name > /dev/null ; then
+ git config --local user.name "buildhistory"
+ fi
# Check if there are new/changed files to commit (other than metadata-revs)
repostatus=`git status --porcelain | grep -v " metadata-revs$"`
HOSTNAME=`hostname 2>/dev/null || echo unknown`