]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
populate_sdk_ext: do not require CONF_VERSION (e.g. local.conf version) to be set master
authorAlexander Kanavin <alex@linutronix.de>
Wed, 1 Oct 2025 11:45:40 +0000 (13:45 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 2 Oct 2025 10:27:31 +0000 (11:27 +0100)
The version checks for local.conf/site.conf/bblayers.conf are all optional,
and aren't enforced (by insane class) if the versions aren't set.

As bitbake-setup writes out a blank local.conf, it doesn't put a version in it
either. Also, esdk bundle has a fixed set of layers and is not at risk of
needing to update its own local.conf.

The same condition is already in place for esdk's bblayers.conf for similar reasons.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/populate_sdk_ext.bbclass

index 20dfdf02d426c95790e68e17b4cda9e9fa932c1a..36a3e9c836d7a3367e8735c7a8f0d6bff2cb9a11 100644 (file)
@@ -345,7 +345,13 @@ def write_local_conf(d, baseoutpath, derivative, core_meta_subdir, uninative_che
             if bb.data.inherits_class('uninative', d):
                f.write('INHERIT += "%s"\n' % 'uninative')
                f.write('UNINATIVE_CHECKSUM[%s] = "%s"\n\n' % (d.getVar('BUILD_ARCH'), uninative_checksum))
             if bb.data.inherits_class('uninative', d):
                f.write('INHERIT += "%s"\n' % 'uninative')
                f.write('UNINATIVE_CHECKSUM[%s] = "%s"\n\n' % (d.getVar('BUILD_ARCH'), uninative_checksum))
-            f.write('CONF_VERSION = "%s"\n\n' % d.getVar('CONF_VERSION', False))
+
+            # CONF_VERSION may not be set, for example when using an empty local.conf
+            # generated with bitbake-setup, and it is not otherwise required to exist.
+            # Write it out only if it's defined.
+            conf_version = d.getVar('CONF_VERSION', False)
+            if conf_version is not None:
+                f.write('CONF_VERSION = "%s"\n\n' % conf_version)
 
             # Some classes are not suitable for SDK, remove them from INHERIT
             f.write('INHERIT:remove = "%s"\n' % d.getVar('ESDK_CLASS_INHERIT_DISABLE', False))
 
             # Some classes are not suitable for SDK, remove them from INHERIT
             f.write('INHERIT:remove = "%s"\n' % d.getVar('ESDK_CLASS_INHERIT_DISABLE', False))