public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: quaresma.jose@gmail.com, openembedded-core@lists.openembedded.org
Cc: Jose Quaresma <jose.quaresma@foundries.io>,
	Jose Quaresma <jose.quaresma@oss.qualcomm.com>
Subject: Re: [OE-core][PATCH] pacth: add user and email when patchtool is git
Date: Fri, 13 Mar 2026 12:49:50 +0000	[thread overview]
Message-ID: <86735ada0cf017f2d6ea85c36359689515d0b414.camel@linuxfoundation.org> (raw)
In-Reply-To: <20260313115345.4704-2-jose.quaresma@foundries.io>

On Fri, 2026-03-13 at 11:53 +0000, Jose Quaresma via lists.openembedded.org wrote:
> From: Jose Quaresma <jose.quaresma@oss.qualcomm.com>
> 
> When the PATCHTOOL=git, oe-core creates a git repo for the sources with:
> 
>  git init
>  git add .
>  git commit
> 
> The git commit fails blindly due to misconfigured user when git don't have
> the email proper configured. Although the commit command does not fail
> because it returns 0, it is not executed and the tree remains with all
> files staged so the following git commands can fail and fails in some cases.
> 
> This problem has been particularly observed in some obscure and little-used
> cases in openembedded-core like patching the linux-firmware which only works
> using PATCHTOOL=git because it deals with binary files.
> 
> Signed-off-by: Jose Quaresma <jose.quaresma@oss.qualcomm.com>
> ---
>  meta/lib/oe/patch.py | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
> index afc42df8a7..abc822f7fb 100644
> --- a/meta/lib/oe/patch.py
> +++ b/meta/lib/oe/patch.py
> @@ -318,6 +318,8 @@ class GitApplyTree(PatchTree):
>  
>      def _initRepo(self):
>          runcmd("git init".split(), self.dir)
> +        runcmd(("git config user.email %s" % self.commitemail).split(), self.dir)
> +        runcmd(("git config user.name %s" % self.commituser).split(), self.dir)

If my name is "Richard Purdie", does that split() do the right thing?

You may just have to split it out in advance:

runcmd(["git, "config", "user.name", self.commituser], self.dir)

Cheers,

Richard


  reply	other threads:[~2026-03-13 12:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-13 11:53 [OE-core][PATCH] pacth: add user and email when patchtool is git Jose Quaresma
2026-03-13 12:49 ` Richard Purdie [this message]
2026-03-13 17:17   ` Jose Quaresma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86735ada0cf017f2d6ea85c36359689515d0b414.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=jose.quaresma@foundries.io \
    --cc=jose.quaresma@oss.qualcomm.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=quaresma.jose@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox