]> code.ossystems Code Review - openembedded-core.git/commitdiff
populate_sdk_ext: Do not assume local.conf will always exist
authorKhem Raj <raj.khem@gmail.com>
Sun, 13 Sep 2020 07:44:00 +0000 (00:44 -0700)
committerSteve Sakoman <steve@sakoman.com>
Mon, 14 Sep 2020 14:49:12 +0000 (04:49 -1000)
Some distros may not have local.conf, and use auto.conf or site.conf
alone to describe distro config metadata, therefore make code robust
to not fail eSDK builds for such setups

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 6379f951ba92b2b86a55de5fc267bacf8c6095d2)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/classes/populate_sdk_ext.bbclass

index fd0da16e7ea2b73051b70800380fbd34598d5d1c..71686bc9932a50234d7e23b23cb4c9a33280d3d1 100644 (file)
@@ -310,8 +310,9 @@ python copy_buildsystem () {
         if os.path.exists(builddir + '/conf/auto.conf'):
             with open(builddir + '/conf/auto.conf', 'r') as f:
                 oldlines += f.readlines()
-        with open(builddir + '/conf/local.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()
         (updated, newlines) = bb.utils.edit_metadata(oldlines, varlist, handle_var)
 
         with open(baseoutpath + '/conf/local.conf', 'w') as f: