On 2024-10-08 02:33, Katariina Lounento via lists.openembedded.org wrote:
From: Katariina Lounento <[email protected]>

The list of valid statuses (`upstream_status_literal_valid_status`) was
missing "Inactive-Upstream", which caused patchtest to fail the test
test_patch.TestPatch.test_upstream_status_presence_format for patches
containing lines like:

     +Upstream-Status: Inactive-Upstream [lastrelease: 2013 lastcommit: 2013]

with the error:

     FAIL: test Upstream-Status presence: Upstream-Status is in incorrect 
format (test_patch.TestPatch.test_upstream_status_presence_format)

"Inactive-Upstream" is documented in the Yocto Project and OpenEmbedded
Contributor Guide [1]:

     Inactive-Upstream [lastcommit: when (and/or) lastrelease: when]

         The upstream is no longer available. This typically means a
         defunct project where no activity has happened for a long time —
         measured in years. To make that judgement, it is recommended to
         look at not only when the last release happened, but also when
         the last commit happened, and whether newly made bug reports and
         merge requests since that time receive no reaction. It is also
         recommended to add to the patch description any relevant links
         where the inactivity can be clearly seen.

`upstream_status_nonliteral_valid_status` only seems to be used in
logging and the value was copied verbatim from the aforementioned
documentation.

After this change all upstream status options documented in [1] are
covered.

[1] 
https://docs.yoctoproject.org/5.0.3/contributor-guide/recipe-style-guide.html#patch-upstream-status

Signed-off-by: Katariina Lounento <[email protected]>
LGTM if everyone else is OK with it. As an FYI, we might see some errors with this applied on the AB for testing, as there are some ongoing issues with patches for patchtest being in master-next but not master.
---
  meta/lib/patchtest/patchtest_patterns.py | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/lib/patchtest/patchtest_patterns.py 
b/meta/lib/patchtest/patchtest_patterns.py
index 8c2e192fc9..10d23ab77f 100644
--- a/meta/lib/patchtest/patchtest_patterns.py
+++ b/meta/lib/patchtest/patchtest_patterns.py
@@ -83,8 +83,8 @@ patch_signed_off_by = pyparsing.AtLineStart("+" + 
signed_off_by_prefix + signed_
# upstream-status -upstream_status_literal_valid_status = ["Pending", "Backport", "Denied", "Inappropriate", "Submitted"]
-upstream_status_nonliteral_valid_status = ["Pending", "Backport", "Denied", "Inappropriate 
[reason]", "Submitted [where]"]
+upstream_status_literal_valid_status = ["Pending", "Backport", "Denied", "Inappropriate", 
"Submitted", "Inactive-Upstream"]
+upstream_status_nonliteral_valid_status = ["Pending", "Backport", "Denied", "Inappropriate 
[reason]", "Submitted [where]", "Inactive-Upstream [lastcommit: when (and/or) lastrelease: when]"]
upstream_status_valid_status = pyparsing.Or(
      [pyparsing.Literal(status) for status in 
upstream_status_literal_valid_status]



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#206585): 
https://lists.openembedded.org/g/openembedded-core/message/206585
Mute This Topic: https://lists.openembedded.org/mt/108884475/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to