diff mbox series

[AUH,v4,2/2] steps: skip changelog in commit message when devtool flags it

Message ID 20261027133046.300849-2-daniel.turull@ericsson.com
State New
Headers show
Series [AUH,v4,1/2] steps: read changelog through devtool's metadata file | expand

Commit Message

Daniel Turull Oct. 27, 2026, 1:30 p.m. UTC
From: Daniel Turull <daniel.turull@ericsson.com>

Some upstream changelogs are badly formed for a commit message (e.g.
mesa, gstreamer release notes, raw git log dumps) and make the upgrade
commits hard to read. 'devtool upgrade' now flags these, driven by
RECIPE_UPGRADE_CHANGELOG_SKIP in OE-Core, so honour that and leave them
out of the commit message. The changelog is still attached to the AUH
email, so the information is not lost.

This depends on the OE-Core patch "devtool: upgrade: flag badly
formed changelogs in metadata".

Assisted-by: kiro:claude-sonnet-5.5
Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
---
Changes in v4:
- Use the devtool_changelog_skip field exposed in pkg_ctx by the
  previous patch (Alexander)
Changes in v3:
- Parse the devtool metadata JSON once and keep it in
  pkg_ctx['changelog_metadata'] instead of reading it in a separate
  _changelog_skip() helper (Alexander)
- Split the _get_changelog() refactor into a separate patch
---
 modules/steps.py | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/modules/steps.py b/modules/steps.py
index a68dec4..a24674b 100644
--- a/modules/steps.py
+++ b/modules/steps.py
@@ -114,6 +114,10 @@  def _append_changelog_to_commit_msg(group, opts):
     for p in group['pkgs']:
         if 'changelog_text' not in p:
             continue
+        # Changelog stays attached to the email, only the commit message skips it
+        if p.get('devtool_changelog_skip'):
+            I(" %s: changelog not added to commit message (RECIPE_UPGRADE_CHANGELOG_SKIP)" % p['PN'])
+            continue
         text = p['changelog_text'].strip()
         # Group recipes may share a source and produce identical changelogs
         # (e.g. mesa, mesa-native); skip proven duplicates, keep the rest.