From: Qi.Chen@windriver.com
To: openembedded-core@lists.openembedded.org
Cc: alex.kanavin@gmail.com, randy.macleod@windriver.com
Subject: [OE-core][PATCH V5 2/7] upstream-stable-release-point.bbclass: add bbclass for stable point upgrade
Date: Wed, 13 May 2026 13:23:29 +0800 [thread overview]
Message-ID: <20260513052334.2271800-2-Qi.Chen@windriver.com> (raw)
In-Reply-To: <20260513052334.2271800-1-Qi.Chen@windriver.com>
From: Chen Qi <Qi.Chen@windriver.com>
If a recipe can do stable version upgrade and the stable parts of the version
is seperated by '.', then it can inherit this bbclass.
By default, the stable parts number is 2, which means the following upgrades
are stable version upgrades:
x.y.z -> x.y.z+1
x.y.z+1 -> x.y.z+1.zz
x.y.z+1.zz -> x.y.z+2
Recipes that have different stable version parts can also inherit this bbclass
and set STABLE_VERSION_PARTS. For example, systemd sets this variable to "1".
For recipes whose stable version part is not separated by '.', they should not
inherit this bbclass and intead set UPSTREAM_STABLE_RELEASE_REGEX themselves.
For example, openssh's stable part is separted by 'p' and should not inherit
this bbclass.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
.../upstream-stable-release-point.bbclass | 21 +++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 meta/classes-recipe/upstream-stable-release-point.bbclass
diff --git a/meta/classes-recipe/upstream-stable-release-point.bbclass b/meta/classes-recipe/upstream-stable-release-point.bbclass
new file mode 100644
index 0000000000..13040e541b
--- /dev/null
+++ b/meta/classes-recipe/upstream-stable-release-point.bbclass
@@ -0,0 +1,21 @@
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+#
+# This bbclass is expected to be inherited by recipes explicitly.
+# If a recipe's version is separated by point and we know for sure
+# which parts of the version represent the stable part, then the
+# recipe could inherit this bbclass.
+#
+
+STABLE_VERSION_PARTS ?= "2"
+def get_majmin_version_regex(d):
+ pv = d.getVar('PV')
+ stable_parts = pv.split('.')[:int(d.getVar('STABLE_VERSION_PARTS'))]
+ return '\.'.join(stable_parts)
+
+STABLE_VERSION_REGEX = "${@get_majmin_version_regex(d)}"
+UPSTREAM_STABLE_RELEASE_REGEX ?= "^${STABLE_VERSION_REGEX}(\.\d+)*$"
--
2.34.1
next prev parent reply other threads:[~2026-05-13 5:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-13 5:23 [OE-core][PATCH V5 1/7] recipeutils: add optional stable_upgrade parameter to get_recipe_upgrade_status Qi.Chen
2026-05-13 5:23 ` Qi.Chen [this message]
2026-05-13 5:23 ` [OE-core][PATCH V5 3/7] vte: inherit upstream-stable-release-point Qi.Chen
2026-05-13 5:23 ` [OE-core][PATCH V5 4/7] systemd: " Qi.Chen
2026-05-13 5:23 ` [OE-core][PATCH V5 5/7] kmod: " Qi.Chen
2026-05-13 5:23 ` [OE-core][PATCH V5 6/7] util-linux: " Qi.Chen
2026-05-13 5:23 ` [OE-core][PATCH V5 7/7] openssh: set UPSTREAM_STABLE_RELEASE_REGEX Qi.Chen
2026-05-13 9:35 ` [OE-core][PATCH V5 1/7] recipeutils: add optional stable_upgrade parameter to get_recipe_upgrade_status Alexander Kanavin
2026-05-13 9:44 ` Daniel Turull
2026-05-13 9:51 ` Alexander Kanavin
2026-05-14 4:27 ` Chen, Qi
2026-05-14 4:16 ` Chen, Qi
2026-05-14 10:38 ` Mathieu Dubois-Briand
2026-05-15 9:06 ` Chen, Qi
2026-05-15 10:22 ` Alexander Kanavin
2026-05-15 11:00 ` Mathieu Dubois-Briand
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=20260513052334.2271800-2-Qi.Chen@windriver.com \
--to=qi.chen@windriver.com \
--cc=alex.kanavin@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=randy.macleod@windriver.com \
/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.