summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/buildhistory.bbclass15
-rw-r--r--meta/classes/kernel-yocto.bbclass3
-rw-r--r--meta/classes/utils.bbclass10
3 files changed, 19 insertions, 9 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 6e5de0ef69..3a5bc2c3e3 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -57,6 +57,9 @@ SSTATEPOSTINSTFUNCS[vardepvalueexclude] .= "| buildhistory_emit_pkghistory"
57# class. 57# class.
58BUILDHISTORY_PRESERVE = "latest latest_srcrev" 58BUILDHISTORY_PRESERVE = "latest latest_srcrev"
59 59
60PATCH_GIT_USER_EMAIL ?= "buildhistory@oe"
61PATCH_GIT_USER_NAME ?= "OpenEmbedded"
62
60# 63#
61# Write out metadata about this package for comparison when writing future packages 64# Write out metadata about this package for comparison when writing future packages
62# 65#
@@ -708,15 +711,9 @@ END
708 git tag -f build-minus-2 build-minus-1 > /dev/null 2>&1 || true 711 git tag -f build-minus-2 build-minus-1 > /dev/null 2>&1 || true
709 git tag -f build-minus-1 > /dev/null 2>&1 || true 712 git tag -f build-minus-1 > /dev/null 2>&1 || true
710 fi 713 fi
711 # If the user hasn't set up their name/email, set some defaults 714
712 # just for this repo (otherwise the commit will fail with older 715 check_git_config
713 # versions of git) 716
714 if ! git config user.email > /dev/null ; then
715 git config --local user.email "buildhistory@${DISTRO}"
716 fi
717 if ! git config user.name > /dev/null ; then
718 git config --local user.name "buildhistory"
719 fi
720 # Check if there are new/changed files to commit (other than metadata-revs) 717 # Check if there are new/changed files to commit (other than metadata-revs)
721 repostatus=`git status --porcelain | grep -v " metadata-revs$"` 718 repostatus=`git status --porcelain | grep -v " metadata-revs$"`
722 HOSTNAME=`hostname 2>/dev/null || echo unknown` 719 HOSTNAME=`hostname 2>/dev/null || echo unknown`
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 53659f2f37..6160a29ecb 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -1,5 +1,7 @@
1# remove tasks that modify the source tree in case externalsrc is inherited 1# remove tasks that modify the source tree in case externalsrc is inherited
2SRCTREECOVEREDTASKS += "do_kernel_configme do_validate_branches do_kernel_configcheck do_kernel_checkout do_fetch do_unpack do_patch" 2SRCTREECOVEREDTASKS += "do_kernel_configme do_validate_branches do_kernel_configcheck do_kernel_checkout do_fetch do_unpack do_patch"
3PATCH_GIT_USER_EMAIL ?= "kernel-yocto@oe"
4PATCH_GIT_USER_NAME ?= "OpenEmbedded"
3 5
4# returns local (absolute) path names for all valid patches in the 6# returns local (absolute) path names for all valid patches in the
5# src_uri 7# src_uri
@@ -159,6 +161,7 @@ do_kernel_metadata() {
159do_patch() { 161do_patch() {
160 cd ${S} 162 cd ${S}
161 163
164 check_git_config
162 meta_dir=$(kgit --meta) 165 meta_dir=$(kgit --meta)
163 (cd ${meta_dir}; ln -sf patch.queue series) 166 (cd ${meta_dir}; ln -sf patch.queue series)
164 if [ -f "${meta_dir}/series" ]; then 167 if [ -f "${meta_dir}/series" ]; then
diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index 800b56578c..dbb5e4cbbc 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -419,3 +419,13 @@ def all_multilib_tune_list(vars, d):
419 values[v].append(localdata.getVar(v, True)) 419 values[v].append(localdata.getVar(v, True))
420 values['ml'].append(item) 420 values['ml'].append(item)
421 return values 421 return values
422
423# If the user hasn't set up their name/email, set some defaults
424check_git_config() {
425 if ! git config user.email > /dev/null ; then
426 git config --local user.email "${PATCH_GIT_USER_EMAIL}"
427 fi
428 if ! git config user.name > /dev/null ; then
429 git config --local user.name "${PATCH_GIT_USER_NAME}"
430 fi
431}