Skip to contentSkip to conversation

layer.conf: add a bb_min_version statement to perform an early bitbake version check

PATCH New Alexander Kanavin 1 participant 1 message Oct 27, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 layer.conf: add a bb_min_version statement to perform an early bitbake version check

From: Alexander Kanavin <[email protected]>

Please see the corresponding change in bitbake for the rationale:
https://lists.openembedded.org/g/bitbake-devel/message/18223

This change also means the identical later check in sanity will never fail, and so that can be removed.

---
 meta/classes-global/sanity.bbclass | 5 -----
 meta/conf/layer.conf               | 3 +++
 meta/conf/sanity.conf              | 2 --
 3 files changed, 3 insertions(+), 7 deletions(-)
meta/classes-global/sanity.bbclass +0 -5
index 6934e071a3d..bdd4d1474ef 100644
@@ -845,11 +845,6 @@ def check_sanity_everybuild(status, d):
     if sys.hexversion < 0x030900F0:
         status.addresult('The system requires at least Python 3.9 to run. Please update your Python interpreter.\n')
 
-    # Check the bitbake version meets minimum requirements
-    minversion = d.getVar('BB_MIN_VERSION')
-    if bb.utils.vercmp_string_op(bb.__version__, minversion, "<"):
-        status.addresult('Bitbake version %s is required and version %s was found\n' % (minversion, bb.__version__))
-
     sanity_check_locale(d)
 
     paths = d.getVar('PATH').split(":")
meta/conf/layer.conf +3 -0
index 54fa04e213e..d6dbad040c2 100644
@@ -1,3 +1,6 @@
+BB_MIN_VERSION = "2.15.2"
+bitbake_min_version ${BB_MIN_VERSION}
+
 # We have a conf and classes directory, add to BBPATH
 BBPATH .= ":${LAYERDIR}"
 # We have recipes-* directories, add to BBFILES
meta/conf/sanity.conf +0 -2
index 71828542748..602a7701f4c 100644
@@ -3,8 +3,6 @@
 # See sanity.bbclass
 #
 # Expert users can confirm their sanity with "touch conf/sanity.conf"
-BB_MIN_VERSION = "2.15.2"
-
 SANITY_ABIFILE = "${TMPDIR}/abi_version"
 
 SANITY_VERSION ?= "1"
Signature · 1 line
2.39.5