]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
populate_sdk_ext: Update to toolcfg.conf
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 6 Oct 2025 23:05:36 +0000 (00:05 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 9 Oct 2025 09:26:05 +0000 (10:26 +0100)
Add handling for toolcfg to the eSDK generation. Take the opporunity to clean
up the code duplication too.

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

index 36a3e9c836d7a3367e8735c7a8f0d6bff2cb9a11..2859320ddf3b825d46d6178da77cb86b20d98739 100644 (file)
@@ -317,15 +317,10 @@ def write_local_conf(d, baseoutpath, derivative, core_meta_subdir, uninative_che
                 return origvalue, op, 0, True
         varlist = ['[^#=+ ]*']
         oldlines = []
-        if os.path.exists(builddir + '/conf/site.conf'):
-            with open(builddir + '/conf/site.conf', 'r') as f:
-                oldlines += f.readlines()
-        if os.path.exists(builddir + '/conf/auto.conf'):
-            with open(builddir + '/conf/auto.conf', 'r') as f:
-                oldlines += f.readlines()
-        if os.path.exists(builddir + '/conf/local.conf'):
-            with open(builddir + '/conf/local.conf', 'r') as f:
-                oldlines += f.readlines()
+        for conffile in ['site.conf', 'auto.conf', 'toolcfg.conf', 'local.conf']:
+            if os.path.exists(builddir + '/conf/' + conffile):
+                with open(builddir + '/conf/' + conffile, 'r') as f:
+                    oldlines += f.readlines()
         (updated, newlines) = bb.utils.edit_metadata(oldlines, varlist, handle_var)
 
         with open(baseoutpath + '/conf/local.conf', 'w') as f: