diff mbox series

[AUH] steps: add changelog_skip_recipes option

Message ID 20261020090831.3132131-1-daniel.turull@ericsson.com
State New
Headers show
Series [AUH] steps: add changelog_skip_recipes option | expand

Commit Message

Daniel Turull Oct. 20, 2026, 9:08 a.m. UTC
From: Daniel Turull <daniel.turull@ericsson.com>

Some upstream changelogs are badly formed or too long for a commit
message (e.g. mesa, gstreamer release notes, raw git log dumps).
Add a changelog_skip_recipes setting: a space-separated list of
recipe names (shell globs allowed) whose changelog is not added to
the commit message. The changelog file is still attached to the AUH
email. Default is empty, so behaviour is unchanged.

Assisted-by: kiro:claude-opus-5.5
Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
---
 modules/steps.py    | 5 +++++
 upgrade-helper.conf | 5 +++++
 upgrade-helper.py   | 1 +
 3 files changed, 11 insertions(+)
diff mbox series

Patch

diff --git a/modules/steps.py b/modules/steps.py
index e678a4b..7dcc614 100644
--- a/modules/steps.py
+++ b/modules/steps.py
@@ -19,6 +19,7 @@ 
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 #
 
+import fnmatch
 import os
 import shutil
 import re
@@ -102,6 +103,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 any(fnmatch.fnmatchcase(p['PN'], pat) for pat in opts['changelog_skip_recipes']):
+            I(" %s: changelog not added to commit message (changelog_skip_recipes)" % 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.
diff --git a/upgrade-helper.conf b/upgrade-helper.conf
index 26db0c5..d3f5eed 100644
--- a/upgrade-helper.conf
+++ b/upgrade-helper.conf
@@ -145,3 +145,8 @@ 
 # commit message. Longer changelogs are truncated. The full changelog
 # is always available as an attachment.
 #changelog_max_len=5000
+
+# Space separated list of recipes (shell globs allowed) whose changelog
+# is not included in the commit message. The changelog is still attached
+# to the AUH email.
+#changelog_skip_recipes=mesa* gstreamer1.0* gst-* cmake*
diff --git a/upgrade-helper.py b/upgrade-helper.py
index 56b1f02..a6b2e29 100755
--- a/upgrade-helper.py
+++ b/upgrade-helper.py
@@ -220,6 +220,7 @@  class Updater(object):
         self.opts['buildhistory'] = self._buildhistory_is_enabled()
         self.opts['testimage'] = self._testimage_is_enabled()
         self.opts['changelog_max_len'] = settings.get('changelog_max_len', '5000')
+        self.opts['changelog_skip_recipes'] = settings.get('changelog_skip_recipes', '').split()
 
     def _make_dirs(self, build_dir):
         self.uh_dir = os.path.join(build_dir, "upgrade-helper")