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-14 00:14:28 +0100 |
commit | 31bbf06a13b1599c5ad15c8988a053b410fca8d4 (patch) | |
tree | b936917558b97fae4efac93f519d488d82c85cb3 /meta | |
parent | 2d62f6d7d9501e12ea77dae4277755bb4566cdee (diff) | |
download | poky-31bbf06a13b1599c5ad15c8988a053b410fca8d4.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: 6379f951ba92b2b86a55de5fc267bacf8c6095d2)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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 44d99cfb97..d659b6940a 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: |