]> code.ossystems Code Review - openembedded-core.git/commitdiff
qemuboot.bbclass: don't fail on very first build
authorAndré Draszik <git@andred.net>
Fri, 16 Sep 2016 10:06:29 +0000 (11:06 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 20 Sep 2016 14:10:35 +0000 (15:10 +0100)
During the very first build, the DEPLOY_DIR_IMAGE
directory might not have been created yet, causing
the creation of the qemuboot.conf config file to
fail.

This is because write_qemuboot_conf() runs at
rootfs creation time, i.e. before deploy.

So let's create the directory if necessary before
trying to write the config file.

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/qemuboot.bbclass

index 802eb59f71dc3d123d365dc19382bde13786b4b3..97a235772d96b919a0efd861764faec65d4eb155 100644 (file)
@@ -72,6 +72,7 @@ python write_qemuboot_conf() {
     kernel = os.readlink(kernel_link)
     cf.set('config_bsp', 'QB_DEFAULT_KERNEL', kernel)
 
+    bb.utils.mkdirhier(os.path.dirname(qemuboot))
     with open(qemuboot, 'w') as f:
         cf.write(f)