summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-09-13 07:44:00 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-22 22:34:40 (GMT)
commit2f63316394d780a2525074d960122583a5f80f20 (patch)
treec67be10ba7697581eb656f9b1df80fc4b6977cd3
parenta509a6301e339d05b8d1e86c6934367630aad407 (diff)
downloadpoky-2f63316394d780a2525074d960122583a5f80f20.tar.gz
populate_sdk_ext: Do not assume local.conf will always exist
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 (From OE-Core rev: 554dba802108c91b79acf81c046e6a47815404fb) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/populate_sdk_ext.bbclass5
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index fd0da16..71686bc 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -310,8 +310,9 @@ python copy_buildsystem () {
310 if os.path.exists(builddir + '/conf/auto.conf'): 310 if os.path.exists(builddir + '/conf/auto.conf'):
311 with open(builddir + '/conf/auto.conf', 'r') as f: 311 with open(builddir + '/conf/auto.conf', 'r') as f:
312 oldlines += f.readlines() 312 oldlines += f.readlines()
313 with open(builddir + '/conf/local.conf', 'r') as f: 313 if os.path.exists(builddir + '/conf/local.conf'):
314 oldlines += f.readlines() 314 with open(builddir + '/conf/local.conf', 'r') as f:
315 oldlines += f.readlines()
315 (updated, newlines) = bb.utils.edit_metadata(oldlines, varlist, handle_var) 316 (updated, newlines) = bb.utils.edit_metadata(oldlines, varlist, handle_var)
316 317
317 with open(baseoutpath + '/conf/local.conf', 'w') as f: 318 with open(baseoutpath + '/conf/local.conf', 'w') as f: