Bug 15989 - Missing argument in patch.py breaks devtool modify for some recipes
Summary: Missing argument in patch.py breaks devtool modify for some recipes
Status: NEW
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: oe-core other (show other bugs)
Version: 5.0.9
Hardware: x86 Multiple
: Medium normal
Target Milestone: 6.99
Assignee: Unassigned
QA Contact:
URL:
Whiteboard: NIR 10/31
Depends on:
Blocks:
 
Reported: 2025-10-03 19:57 UTC by Zach Miller
Modified: 2026-04-15 20:10 UTC (History)
1 user (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zach Miller 2025-10-03 19:57:43 UTC
When running devtool modify for a recipe that creates changes outside of a patch file, devtool attempts to commit those changes and fails due to an exception in meta/lib/oe/patch.py in the poky repository. The output in this case also isn't great as it points to log files for tasks which don't actually indicate any failure.

Example recipe which triggers this bug: https://github.com/qualcomm-linux/meta-qcom-hwe/blob/scarthgap/recipes-kernel/linux/linux-qcom-custom_6.6.bb#L137

The copy_msm() function in that recipe directly modifies the source checkout, which triggers commitIgnored() to be called in meta/lib/oe/patch.py. commitIgnored() then calls GitApplyTree.addNote() with incorrect arguments, which triggers the exception.

I think there just needs to be an explicit None as the fourth argument, before the user name argument. If I add a try/except around the call to GitApplyTree.addNote() and print the exception, it's clear that the missing fourth argument shifts the email into the user name and leaves the email missing:

ERROR: Command Error: 'git -c 'user.name="oe.patch@oe"' notes --ref refs/notes/devtool append -m 'ignore: OpenEmbedded' HEAD' exited with 0  Output:
stdout:
stderr: Author identity unknown

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'user@769b18e0f79c.(none)')

I've marked this with version 5.0.9 as that's specifically what I'm using/testing with, but it appears that the same bug is present at the tips of the scarthgap, walnascar, master, and master-next branches.
Comment 1 Randy MacLeod 2025-10-09 14:34:35 UTC
Hi Zack,
Thanks for the bug report.
Are you able to send a patch to the oe-core list?
Is there a test case that we're missing as well? 
If so, that should be included in your commit.

FYI:
  https://docs.yoctoproject.org/contributor-guide/index.html
Comment 2 Zach Miller 2025-10-17 17:32:33 UTC
Hi Randy,

Unfortunately I don't think I or my colleagues have the bandwidth to submit a patch right now.

Regarding test cases, I'm not sure; I'm not familiar with Yocto's test infrastructure.
Comment 3 Randy MacLeod 2025-11-03 20:41:55 UTC
Thanks for the follow-up Zach, even if I don't like the answer! ;-)

Moved to unassigned.
Comment 4 Randy MacLeod 2026-04-15 20:10:59 UTC
No one available / interested in working on devtool so move to the holding area
known as 6.99.