Bug 15940

Summary: Detect tags like Upstream-Status after the scissors in patches
Product: [Yocto Project Subprojects] Patchwork/Patchtest Reporter: Ross Burton <ross.burton>
Component: Patchtest TestsuiteAssignee: Aditya G S <adityags2004>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium CC: adityags2004, Martin.Jansa, randy.macleod, richard.purdie, tgamblin
Version: unspecified   
Target Milestone: 6.1   
Hardware: x86   
OS: Multiple   
Whiteboard: NEWCOMER
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
patchtest: warn if Upstream-Status is after patch scissors
none
Updated patch adityags2004: review? (adityags2004)

Description Ross Burton 2025-07-24 16:43:24 UTC
It's not uncommon for people to put the Upstream-Status or Signed-off-by tags in patches _after_ the patch scissors ("---"), which means they get thrown away by git and so lost when devtool does a patch refresh.

patchtest should detect this and tell the submitter to put the tags above the scissors.
Comment 1 Martin Jansa 2025-12-16 08:20:02 UTC
I'm one of those people who put Upstream-Status after scissors (and migrated all LGE layers to use that), because unlike Signed-off-by this shouldn't be applied in the component repository and many people were applying the patches correctly with "git am", but not removing the Upstream-Status from commit message. After they merge it in component repo it's too late to remove it, but when it's removed by devtool it's easy to notice it missing when reviewing the devtool changes (or it's caught by QA check when Upstream-Status is missing).
Comment 2 Aditya G S 2026-06-08 10:40:51 UTC
I would like to work on this bug.
Comment 3 Randy MacLeod 2026-06-08 15:52:30 UTC
Aditya, 

Another week, another YP bug that you're working on ! ;-)

Trevor will be your main contact for this bug so please CC him on the review.
I think he's just getting back from a conference so 
he may not be online for a few days.
Comment 4 Aditya G S 2026-06-09 05:21:30 UTC
Hi Randy,

Thanks for the guidance!

There are multiple Trevor entries listed in Bugzilla. Could you please confirm
that I should CC Trevor Gamblin <tgamblin@baylibre.com> on the patch submission?

Also, thanks for the encouragement 🙂 I'm getting into a good rhythm
working on these YP bugs week by week.

I'll start working on the implementation and share a patch soon.

Thanks,
Aditya
Comment 5 Aditya G S 2026-06-09 08:37:01 UTC
Created attachment 5229 [details]
patchtest: warn if Upstream-Status is after patch scissors

Hi,

I have implemented the requested change to warn instead of fail when
Upstream-Status is placed after the patch scissors.

Patch sent to the mailing list for review.

Thanks,
Aditya
Comment 6 Aditya G S 2026-06-10 05:53:37 UTC
Hi,

Since the patch for this issue has been submitted and will take some time
to go through the review process, I will be working on another bug in parallel
to continue contributing and gaining experience.

I will monitor the review and promptly address any feedback or required changes.

Thanks,
Aditya
Comment 7 Aditya G S 2026-06-11 09:20:40 UTC
Created attachment 5230 [details]
Updated patch

Hi,
I have addressed the review feedback for this issue.
The patch has been updated to fix the indentation problems raised in the previous version, while retaining the intended behavior of emitting a warning when Upstream-Status appears after the patch scissors.
A v3 of the patch has been sent to the mailing list for review, with Trevor Gamblin CC’d.
I will monitor the mailing list and promptly address any further feedback.
Thanks,
Aditya
Comment 8 Aditya G S 2026-06-15 05:23:48 UTC
Hi,

Thanks for the clarification on the mailing list.

Based on the recent discussion, I now understand that the behavior in oe-core is intended to remain a hard failure, and that my earlier interpretation of this bug was incorrect.

The functionality requested here was already implemented in oe-core in commit 2156ef9e6def (“patchtest: reject Upstream-Status after scissors”), and the Bugzilla entry was simply never closed, which led to the confusion.

Since oe-core should continue rejecting patches that place Upstream-Status after the scissors, I have withdrawn my patch series that attempted to downgrade this check to a warning. Layers that intentionally place this tag after the scissors can disable or override this specific test in their own patchtest configuration, but for oe-core the current behavior is correct.

Please let me know if I should mark this bug as RESOLVED/FIXED, or if maintainers prefer to close it themselves.

Thanks,
Aditya