From: <daniel.turull@ericsson.com>
To: <openembedded-core@lists.openembedded.org>
Cc: Daniel Turull <daniel.turull@ericsson.com>
Subject: [PATCH 3/3] devtool: upgrade: clean up extracted changelog content
Date: Tue, 12 May 2026 09:24:46 +0200 [thread overview]
Message-ID: <20260512072446.2323529-4-daniel.turull@ericsson.com> (raw)
In-Reply-To: <20260512072446.2323529-1-daniel.turull@ericsson.com>
From: Daniel Turull <daniel.turull@ericsson.com>
Collapse runs of multiple blank lines into a single blank line and
strip leading/trailing whitespace from the extracted changelog. This
produces cleaner output that is suitable for inclusion in commit
messages by tools like AUH.
Assisted-by: kiro:claude-opus-4.6
Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
---
scripts/lib/devtool/upgrade.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py
index f2a2c8a6fb..e37ad07ea1 100644
--- a/scripts/lib/devtool/upgrade.py
+++ b/scripts/lib/devtool/upgrade.py
@@ -597,6 +597,11 @@ def _extract_changelog(srctree, pn, old_ver, new_ver, old_tag, new_tag, workspac
if not changelog_content:
return None
+ # Clean up content for readability and commit message use
+ changelog_content = re.sub(r'\n{3,}', '\n\n', changelog_content).strip()
+ if not changelog_content:
+ return None
+
changelog_dir = os.path.join(workspace_path, 'changelogs')
bb.utils.mkdirhier(changelog_dir)
changelog_path = os.path.join(changelog_dir, '%s.txt' % pn)
--
2.34.1
prev parent reply other threads:[~2026-05-12 7:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 7:24 [PATCH 0/3] devtool: add changelog extraction daniel.turull
2026-05-12 7:24 ` [PATCH 1/3] devtool: upgrade: extract changelog between versions daniel.turull
2026-05-12 16:28 ` [OE-core] " Alexander Kanavin
2026-05-13 7:26 ` Daniel Turull
2026-05-12 7:24 ` [PATCH 2/3] devtool: upgrade: detect per-version release notes files daniel.turull
2026-05-12 7:24 ` daniel.turull [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260512072446.2323529-4-daniel.turull@ericsson.com \
--to=daniel.turull@ericsson.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.