From 25b43cb05c645e43f96bc18906441b8fdc272228 Mon Sep 17 00:00:00 2001 From: Stephano Cetola Date: Mon, 3 Oct 2016 16:32:45 -0700 Subject: utils.bbclass: add function to check for git config user If attempting to patch a git repo without a proper git config setup, an error will occur saying user.name/user.email are needed by git am/apply. After some code was removed from kernel-yocto, it was simple enough to reproduce this error by creating a kernel patch and using a container to build. This patch abstracts out functionality that existed in buildhistory for use in other classes. It also adds a call to this functionality to the kernel-yocto class. Fixes [YOCTO #10346] introduced in OE-core revision 0f698dfd1c8bbc0d53ae7977e26685a7a3df52a3 Signed-off-by: Stephano Cetola Signed-off-by: Richard Purdie --- meta/classes/kernel-yocto.bbclass | 3 +++ 1 file changed, 3 insertions(+) (limited to 'meta/classes/kernel-yocto.bbclass') 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 @@ # remove tasks that modify the source tree in case externalsrc is inherited SRCTREECOVEREDTASKS += "do_kernel_configme do_validate_branches do_kernel_configcheck do_kernel_checkout do_fetch do_unpack do_patch" +PATCH_GIT_USER_EMAIL ?= "kernel-yocto@oe" +PATCH_GIT_USER_NAME ?= "OpenEmbedded" # returns local (absolute) path names for all valid patches in the # src_uri @@ -159,6 +161,7 @@ do_kernel_metadata() { do_patch() { cd ${S} + check_git_config meta_dir=$(kgit --meta) (cd ${meta_dir}; ln -sf patch.queue series) if [ -f "${meta_dir}/series" ]; then -- cgit 1.2.3-korg