steps: skip duplicate changelog for shared-source recipes
PATCH v2 1/2 steps: skip duplicate changelog for shared-source recipes
From: Daniel Turull <[email protected]>
- Groups can mix recipes from different sources (e.g. gstreamer plugins), so fetch each recipe's changelog, not just the first.
- Recipes sharing a source (e.g. mesa, mesa-native) produce identical changelogs; only append proven duplicates once to the commit message.
---
v2: change logic to find duplicates and only add if the changelog is not seen before
--- modules/steps.py | 6 ++++++ 1 file changed, 6 insertions(+)
modules/steps.py +6 -0
@@ -98,10 +98,16 @@ def _get_changelog(pn, workdir): def _append_changelog_to_commit_msg(group, opts): max_len = int(opts['changelog_max_len']) + seen = set() for p in group['pkgs']: if 'changelog_text' not in p: 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. + if text in seen: + continue + seen.add(text) if len(text) > max_len: text = (text[:max_len] + "\n\n[Changelog truncated as it exceeds {} characters; \n" "the full changelog can be found in an attachment to the AUH email]".format(max_len))
PATCH v2 2/2 upgrade-helper: deduplicate identical versions in email subject
From: Daniel Turull <[email protected]>
Recipe groups where every recipe upgrades to the same version (e.g. systemd, systemd-tools-native, systemd-boot, systemd-boot-native all to 262) produced a repeated version list in the notification email subject and body, e.g. 'upgrading to 262,262,262,262'. Deduplicate identical versions, same as _make_commit_msg() already does for the commit message subject.
--- upgrade-helper.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
upgrade-helper.py +3 -1
@@ -353,7 +353,9 @@ class Updater(object): else: cc_addr = settings["cc_recipients"].split() - newversions = ",".join([pkg_ctx['NPV'] if not pkg_ctx['NPV'].endswith("new-commits-available") else pkg_ctx['NSRCREV'] for pkg_ctx in g['pkgs']]) + newversions = ",".join(dict.fromkeys( + pkg_ctx['NPV'] if not pkg_ctx['NPV'].endswith("new-commits-available") else pkg_ctx['NSRCREV'] + for pkg_ctx in g['pkgs'])) pns = ",".join([pkg_ctx['PN'] for pkg_ctx in g['pkgs']]) subject = "[AUH] " + pns + ": upgrading to " + newversions if not g['error']:
Re: [auh][PATCH v2 2/2] upgrade-helper: deduplicate identical versions in email subject
Thanks, both patches applied and pushed.
Alex
Quoted 34 lines · On Wed, 23 Sept 2026 at 10:55, <[email protected]> wrote:
From: Daniel Turull <[email protected]>
Recipe groups where every recipe upgrades to the same version (e.g. systemd, systemd-tools-native, systemd-boot, systemd-boot-native all to 262) produced a repeated version list in the notification email subject and body, e.g. 'upgrading to 262,262,262,262'. Deduplicate identical versions, same as
_make_commit_msg()already does for the commit message subject.Assisted-by kiro:claude-sonnet-5Signed-off-by Daniel Turull <[email protected]>--- upgrade-helper.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)upgrade-helper.py +0
-1@@ -353,7 +353,9 @@ class Updater(object): else: cc_addr = settings["cc_recipients"].split() - newversions = ",".join([pkg_ctx['NPV'] if notpkg_ctx['NPV'].endswith("new-commits-available") else pkg_ctx['NSRCREV'] for
pkg_ctxin g['pkgs']])upgrade-helper.py +2
-0+ newversions = ",".join(dict.fromkeys( + pkg_ctx['NPV'] if notpkg_ctx['NPV'].endswith("new-commits-available") else pkg_ctx['NSRCREV']
+ forpkg_ctxin g['pkgs']))pns = ",".join([pkg_ctx['PN'] for pkg_ctx in g['pkgs']]) subject = "[AUH] " + pns + ": upgrading to " + newversions if not g['error']:
Quoted 28 lines · On Wed, 2026-09-23 at 10:55 +0200, [email protected] wrote:
From: Daniel Turull <[email protected]>
- Groups can mix recipes from different sources (e.g. gstreamer plugins), so fetch each recipe's changelog, not just the first.
- Recipes sharing a source (e.g. mesa, mesa-native) produce identical changelogs; only append proven duplicates once to the commit message.Assisted-by kiro:claude-sonnet-5Signed-off-by Daniel Turull <[email protected]>---
v2: change logic to find duplicates and only add if the changelog is not seen before--- modules/steps.py | 6 ++++++ 1 file changed, 6 insertions(+)modules/steps.py +1
-0@@ -98,10 +98,16 @@ def _get_changelog(pn, workdir): def _append_changelog_to_commit_msg(group, opts): max_len = int(opts['changelog_max_len']) + seen = set() for p in group['pkgs']: if 'changelog_text' not in p:
modules/steps.py def _get_changelog(pn, workdir): · line 113
Quoted 10 lines
modules/steps.py +5
-0continue 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. + if text in seen: + continue + seen.add(text) if len(text) > max_len: text = (text[:max_len] + "\n\n[Changelog truncated as it exceeds {} characters; \n" "the full changelog can be found in an attachment to the AUH email]".format(max_len))
The patch will work when the oe-
patch https://lore.kernel.org/openembedded-core/[email protected]/
that I send to create the metadata is merged. Until then the files are slightly different with the changelog since the recipe is on it.
Daniel
Quoted 9 lines · Daniel Turull
The patch will work when the oe-
patch
https://lore.kernel.org/openembedded-core/[email protected]/that I send to create the metadata is merged. Until then the files are slightly
different with the changelog since the recipe is on it.
That patch is already merged?
https://git.openembedded.org/openembedded-core/log/
Alex
Quoted 6 lines · Alexander Kanavin
Quoted 4 lines · Daniel Turull
The patch will work when the oe-
patch https://lore.kernel.org/openembedded-core/[email protected]/
Quoted 7 lines
Quoted 3 lines
that I send to create the metadata is merged. Until then the files are slightly different with the changelog since the recipe is on it.
That patch is already merged?
https://git.openembedded.org/openembedded-core/log/
Yes. I did check to quickly without pulling oe-core
Daniel
Quoted 1 line
Alex