Skip to contentSkip to conversation

qemuboot.bbclass: don't fail on very first build

PATCH New André Draszik 1 participant 1 message Sep 16, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemuboot.bbclass: don't fail on very first build

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.

---
 meta/classes/qemuboot.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes/qemuboot.bbclass +1 -0
index 8500c73..4c7d205 100644
@@ -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)
 
Signature · 1 line
2.9.3