Skip to contentSkip to conversation

steps: add changelog_skip_recipes option

PATCH New [email protected] 1 participant 1 message Oct 20

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 steps: add changelog_skip_recipes option

From: Daniel Turull <[email protected]>

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
---
 modules/steps.py    | 5 +++++
 upgrade-helper.conf | 5 +++++
 upgrade-helper.py   | 1 +
 3 files changed, 11 insertions(+)
modules/steps.py +5 -0
index e678a4b..7dcc614 100644
@@ -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.
upgrade-helper.conf +5 -0
index 26db0c5..d3f5eed 100644
@@ -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*
upgrade-helper.py +1 -0
index 56b1f02..a6b2e29 100755
@@ -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")