]> code.ossystems Code Review - openembedded-core.git/commitdiff
populate_sdk_ext: Only write LCONF_VERSION to bblayers if it is set
authorRandy Witt <randy.e.witt@linux.intel.com>
Mon, 29 Feb 2016 22:22:36 +0000 (14:22 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 2 Mar 2016 22:39:07 +0000 (22:39 +0000)
It is possible that LCONF_VERSION won't be set, such as if meta-poky is
used. Without this change, bblayers.conf would have LCONF_VERSION =
"None" if LCONF_VERSION wasn't set, which would cause a sanity check
failure.

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/populate_sdk_ext.bbclass

index 1f0621489f4ab2fc6d4e39697d73cabd88263a5a..6079166980964bd95c32c2768812ded285d097c8 100644 (file)
@@ -143,7 +143,12 @@ python copy_buildsystem () {
         f.write('# this configuration provides, it is strongly suggested that you set\n')
         f.write('# up a proper instance of the full build system and use that instead.\n\n')
 
-        f.write('LCONF_VERSION = "%s"\n\n' % d.getVar('LCONF_VERSION', False))
+        # LCONF_VERSION may not be set, for example when using meta-poky
+        # so don't error if it isn't found
+        lconf_version = d.getVar('LCONF_VERSION', False)
+        if lconf_version is not None:
+            f.write('LCONF_VERSION = "%s"\n\n' % lconf_version)
+
         f.write('BBPATH = "$' + '{TOPDIR}"\n')
         f.write('SDKBASEMETAPATH = "$' + '{TOPDIR}"\n')
         f.write('BBLAYERS := " \\\n')