diff options
author | Khem Raj <raj.khem@gmail.com> | 2020-09-13 00:44:00 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-22 23:34:40 +0100 |
commit | 2f63316394d780a2525074d960122583a5f80f20 (patch) | |
tree | c67be10ba7697581eb656f9b1df80fc4b6977cd3 | |
parent | a509a6301e339d05b8d1e86c6934367630aad407 (diff) | |
download | poky-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.bbclass | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass index fd0da16e7e..71686bc993 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: |