From 2f63316394d780a2525074d960122583a5f80f20 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 13 Sep 2020 00:44:00 -0700 Subject: 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 Signed-off-by: Richard Purdie (cherry picked from commit 6379f951ba92b2b86a55de5fc267bacf8c6095d2) Signed-off-by: Steve Sakoman Signed-off-by: Richard Purdie --- meta/classes/populate_sdk_ext.bbclass | 5 +++-- 1 file 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 () { 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: -- cgit v1.2.3-54-g00ecf