From: Chen Qi <[email protected]> When inheriting this bbclass, the recipe should have been checked to be sure that the last part bump (e.g., 1.0.0 -> 1.0.1 or 34 -> 34.1) is a stable version upgrade.
Signed-off-by: Chen Qi <[email protected]> --- .../upstream-stable-release-point.bbclass | 22 +++++++++++++++++++ 1 file changed, 22 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..947f882152 --- /dev/null +++ b/meta/classes-recipe/upstream-stable-release-point.bbclass @@ -0,0 +1,22 @@ +# +# 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 its last part's +# bump is a stable upgrade, then it can inherit this bbclass. +# + +def get_majmin_version_regex(d): + pv = d.getVar('PV') + v_parts = pv.split('.') + if len(v_parts) == 1: + return pv + else: + return '\.'.join(v_parts[:-1]) + +MAJMIN_VERSION_REGEX = "${@get_majmin_version_regex(d)}" +UPSTREAM_STABLE_RELEASE_REGEX = "${MAJMIN_VERSION_REGEX}\.\d" -- 2.34.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#236755): https://lists.openembedded.org/g/openembedded-core/message/236755 Mute This Topic: https://lists.openembedded.org/mt/119226368/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
