* [PATCH v3] patchtest: warn if Upstream-Status is after patch scissors
@ 2026-06-11 9:09 Aditya GS
2026-06-13 13:10 ` [OE-core] " Alexander Kanavin
0 siblings, 1 reply; 3+ messages in thread
From: Aditya GS @ 2026-06-11 9:09 UTC (permalink / raw)
To: openembedded-core; +Cc: tgamblin, Aditya GS
[YOCTO #15940]
Detect cases where Upstream-Status is placed after the patch
scissors ("---") and emit a warning instead of failing.
Such placement may be intentional in some workflows to avoid
including the tag in upstream commits.
v3:
- Fix indentation issues from previous version
- Keep changes minimal and avoid unrelated formatting changes
- Retain intended warning behavior
Signed-off-by: Aditya GS <adityags2004@gmail.com>
---
meta/lib/patchtest/tests/test_patch.py | 24 +++++++++---------------
1 file changed, 9 insertions(+), 15 deletions(-)
diff --git a/meta/lib/patchtest/tests/test_patch.py b/meta/lib/patchtest/tests/test_patch.py
index 3b33b5a199..598a2234aa 100644
--- a/meta/lib/patchtest/tests/test_patch.py
+++ b/meta/lib/patchtest/tests/test_patch.py
@@ -67,13 +67,10 @@ class TestPatch(base.Base):
if not header_has_upstream:
if body_has_upstream:
- self.fail(
- 'Upstream-Status is present only after the patch scissors. '
- "It must be placed in the patch header before the scissors line.",
- data=[
- ("Standard format", self.standard_format),
- ("Valid status", self.valid_status),
- ],
+ print(
+ "WARNING: Upstream-Status is present only after the patch scissors. "
+ "It may be ignored by git and lost during patch refresh. "
+ "Consider placing it before the scissors line."
)
else:
self.fail(
@@ -92,15 +89,12 @@ class TestPatch(base.Base):
continue
if scissors_index is not None and idx > scissors_index:
- self.fail(
- 'Upstream-Status must be placed in the patch header before the scissors line, '
- "but was found afterwards.",
- data=[
- ("Current", line.lstrip("+")),
- ("Standard format", self.standard_format),
- ("Valid status", self.valid_status),
- ],
+ print(
+ "WARNING: Upstream-Status found after patch scissors. "
+ "It may be ignored by git and lost during patch refresh. "
+ "Consider placing it before the scissors line."
)
+ continue
if patchtest_patterns.inappropriate.searchString(line):
try:
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [OE-core] [PATCH v3] patchtest: warn if Upstream-Status is after patch scissors
2026-06-11 9:09 [PATCH v3] patchtest: warn if Upstream-Status is after patch scissors Aditya GS
@ 2026-06-13 13:10 ` Alexander Kanavin
2026-06-15 5:20 ` Aditya G.S
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Kanavin @ 2026-06-13 13:10 UTC (permalink / raw)
To: adityags2004; +Cc: openembedded-core, tgamblin
On Thu, 11 Jun 2026 at 18:05, Aditya GS via lists.openembedded.org
<adityags2004=gmail.com@lists.openembedded.org> wrote:
>
> [YOCTO #15940]
>
> Detect cases where Upstream-Status is placed after the patch
> scissors ("---") and emit a warning instead of failing.
>
> Such placement may be intentional in some workflows to avoid
> including the tag in upstream commits.
I'm afraid there has been a confusion here, and the patch is not correct.
The bug was already addressed in oe-core earlier:
commit 2156ef9e6defa3ec9087789fcea25fb4fee7b83c
Author: Luka Krstic <lukakrstic031@gmail.com>
Date: Thu Dec 18 10:11:38 2025 +0100
patchtest: reject Upstream-Status after scissors
but the bugzilla ticket was never closed.
Then https://bugzilla.yoctoproject.org/show_bug.cgi?id=15940#c1 was
interpreted as a request to downgrade it to a warning, but we should
not be doing that: it means patchtest will not longer actually notify
of the issue on the oe-core mailing list.
I understand some other layers intentionally put it after the
scissors; if they're using patchtest, they can disable this particular
test or configure it to produce some kind of soft fail, but in oe-core
it should remain a hard fail.
Alex
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [OE-core] [PATCH v3] patchtest: warn if Upstream-Status is after patch scissors
2026-06-13 13:10 ` [OE-core] " Alexander Kanavin
@ 2026-06-15 5:20 ` Aditya G.S
0 siblings, 0 replies; 3+ messages in thread
From: Aditya G.S @ 2026-06-15 5:20 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: openembedded-core, tgamblin
[-- Attachment #1: Type: text/plain, Size: 1763 bytes --]
Hi Alex,
Thanks for the clarification.
I understand now that the behavior should remain a hard failure in oe-core,
and that the earlier interpretation was incorrect.
I'll drop the patch that downgrades the check to a warning.
Thanks for pointing out the existing commit in oe-core as well that helps
clear up the confusion.
Regards,
Aditya
On Sat, Jun 13, 2026, 6:41 PM Alexander Kanavin <alex.kanavin@gmail.com>
wrote:
> On Thu, 11 Jun 2026 at 18:05, Aditya GS via lists.openembedded.org
> <adityags2004=gmail.com@lists.openembedded.org> wrote:
> >
> > [YOCTO #15940]
> >
> > Detect cases where Upstream-Status is placed after the patch
> > scissors ("---") and emit a warning instead of failing.
> >
> > Such placement may be intentional in some workflows to avoid
> > including the tag in upstream commits.
>
> I'm afraid there has been a confusion here, and the patch is not correct.
>
> The bug was already addressed in oe-core earlier:
>
> commit 2156ef9e6defa3ec9087789fcea25fb4fee7b83c
> Author: Luka Krstic <lukakrstic031@gmail.com>
> Date: Thu Dec 18 10:11:38 2025 +0100
>
> patchtest: reject Upstream-Status after scissors
>
> but the bugzilla ticket was never closed.
>
> Then https://bugzilla.yoctoproject.org/show_bug.cgi?id=15940#c1 was
> interpreted as a request to downgrade it to a warning, but we should
> not be doing that: it means patchtest will not longer actually notify
> of the issue on the oe-core mailing list.
>
> I understand some other layers intentionally put it after the
> scissors; if they're using patchtest, they can disable this particular
> test or configure it to produce some kind of soft fail, but in oe-core
> it should remain a hard fail.
>
> Alex
>
[-- Attachment #2: Type: text/html, Size: 2788 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-15 14:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-11 9:09 [PATCH v3] patchtest: warn if Upstream-Status is after patch scissors Aditya GS
2026-06-13 13:10 ` [OE-core] " Alexander Kanavin
2026-06-15 5:20 ` Aditya G.S
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox