diff mbox series

meta/lib/oe/recipeutils.py: Handle multi-repo recipes for upgrade check

Message ID 20250923154701.1506704-2-u.kleine-koenig@baylibre.com
State New
Headers show
Series meta/lib/oe/recipeutils.py: Handle multi-repo recipes for upgrade check | expand

Commit Message

Uwe Kleine-König Sept. 23, 2025, 3:47 p.m. UTC
For a recipe that uses more than one git repo there isn't a single
SRCREV variable. For example for linux-yocto there is SRCREV_machine and
SRCREV_meta and rd.getVar("SRCREV") yields "INVALID".

Luckily bb.fetch2 already handles all the details and exposes the
currently used revision in ud. So just use that.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
Hello,

note this is my first OpenEmbedded-Core patch, so please apply some
extra caution before applying this patch.

Note that for testing with linux-yocto I also set

	UPSTREAM_CHECK_COMMITS = "1"

for that recipe. (I'm not sure this is completely right to do in
general, but that's a separate discussion. Without it `devtool
check-upgrade-status linux-yocto` suggested to go to 6.16.y instead of
6.12.$latest.)

Best regards
Uwe

 meta/lib/oe/recipeutils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: e90bc48bdaa2234cad52bbb2800f5246c277ffbd
diff mbox series

Patch

diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index 044f1bfa6140..102789ce735a 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -1075,7 +1075,7 @@  def get_recipe_upstream_version(rd):
             try:
                 revision = ud.method.latest_revision(ud, rd, 'default')
                 upversion = pv
-                if revision != rd.getVar("SRCREV"):
+                if revision != ud.revision:
                     upversion = upversion + "-new-commits-available"
             except bb.fetch2.FetchError as e:
                 bb.warn("Unable to obtain latest revision: {}".format(e))