public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] qemuboot.bbclass: don't fail on very first build
@ 2016-09-16 10:06 André Draszik
  0 siblings, 0 replies; only message in thread
From: André Draszik @ 2016-09-16 10:06 UTC (permalink / raw)
  To: openembedded-core

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>
---
 meta/classes/qemuboot.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass
index 8500c73..4c7d205 100644
--- a/meta/classes/qemuboot.bbclass
+++ b/meta/classes/qemuboot.bbclass
@@ -63,6 +63,7 @@ python write_qemuboot_conf() {
     cf.add_section('config_bsp')
     for k in build_vars + qb_vars:
         cf.set('config_bsp', k, '%s' % d.getVar(k, True))
+    bb.utils.mkdirhier(os.path.dirname(qemuboot))
     with open(qemuboot, 'w') as f:
         cf.write(f)
 
-- 
2.9.3



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-09-16 10:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-16 10:06 [PATCH] qemuboot.bbclass: don't fail on very first build André Draszik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox