]> code.ossystems Code Review - openembedded-core.git/commitdiff
classes/populate_sdk_ext.bbclass: handle if local.conf doesn't end with a newline
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Tue, 12 Jan 2016 18:47:44 +0000 (07:47 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 13 Jan 2016 00:08:25 +0000 (00:08 +0000)
If there is no newline at the end of local.conf, appending
INHERIT = "uninative" won't work, it will corrupt the line and the
installed eSDK will build things, making the "Preparing build system..."
step take an age.

Fixes [YOCTO #8897].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/populate_sdk_ext.bbclass

index 87fb7671fd0ca7ff121aa58a76f2a46c39b8e85b..984f5389f9363d78294c69577be7c8dd22243b10 100644 (file)
@@ -142,6 +142,8 @@ python copy_buildsystem () {
         for line in newlines:
             if line.strip() and not line.startswith('#'):
                 f.write(line)
+        # Write a newline just in case there's none at the end of the original
+        f.write('\n')
 
         f.write('INHERIT += "%s"\n\n' % 'uninative')
         f.write('CONF_VERSION = "%s"\n\n' % d.getVar('CONF_VERSION', False))