<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 12, 2018 at 6:37 PM, Jeremy Puhlman <span dir="ltr"><<a href="mailto:jpuhlman@mvista.com" target="_blank">jpuhlman@mvista.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">/etc/libvirt/qemu.conf doesn't exist if qemu is disabled causing a<br>
build failure.<br>
<br>
Signed-off-by: Jeremy Puhlman <<a href="mailto:jpuhlman@mvista.com">jpuhlman@mvista.com</a>><br>
---<br>
 recipes-extended/libvirt/<a href="http://libvirt_4.3.0.bb" rel="noreferrer" target="_blank">libvi<wbr>rt_4.3.0.bb</a> | 6 ++++--<br>
 1 file changed, 4 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/recipes-extended/libvirt/<a href="http://libvirt_4.3.0.bb" rel="noreferrer" target="_blank">lib<wbr>virt_4.3.0.bb</a> b/recipes-extended/libvirt/<a href="http://libvirt_4.3.0.bb" rel="noreferrer" target="_blank">lib<wbr>virt_4.3.0.bb</a><br>
index ef51b9e..5cae02b 100644<br>
--- a/recipes-extended/libvirt/<a href="http://libvirt_4.3.0.bb" rel="noreferrer" target="_blank">lib<wbr>virt_4.3.0.bb</a><br>
+++ b/recipes-extended/libvirt/<a href="http://libvirt_4.3.0.bb" rel="noreferrer" target="_blank">lib<wbr>virt_4.3.0.bb</a><br>
@@ -266,8 +266,10 @@ do_install_append() {<br>
        fi<br>
<br>
        # disable seccomp_sandbox<br>
-       sed -i '/^#seccomp_sandbox = 1/aseccomp_sandbox = 0' \<br>
-           ${D}${sysconfdir}/libvirt/<wbr>qemu.conf<br>
+        if ${@bb.utils.contains('<wbr>PACKAGECONFIG', 'qemu', 'true', 'false', d)}; then<br></blockquote><div><br></div><div>Rather than key off the package config, why not just test for the file's existence and then only operate on it if it is there ? That is always safe, simpler and protects us from build failures if the behaviour/output of libvirt changes with respect to qemu in the future.</div><div><br></div><div>We could argue that we could check both, or warn if the package config is on, but the file isn't present .. but I'd still prefer to just keep it simple and all basic shell operations.</div><div><br></div><div>Cheers,</div><div><br></div><div>Bruce</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+          sed -i '/^#seccomp_sandbox = 1/aseccomp_sandbox = 0' \<br>
+              ${D}${sysconfdir}/libvirt/<wbr>qemu.conf<br>
+        fi<br>
<br>
        # Add hook support for libvirt<br>
        mkdir -p ${D}/etc/libvirt/hooks<br>
<span class="HOEnZb"><font color="#888888">-- <br>
2.6.2<br>
<br>
-- <br>
______________________________<wbr>_________________<br>
meta-virtualization mailing list<br>
<a href="mailto:meta-virtualization@yoctoproject.org">meta-virtualization@<wbr>yoctoproject.org</a><br>
<a href="https://lists.yoctoproject.org/listinfo/meta-virtualization" rel="noreferrer" target="_blank">https://lists.yoctoproject.<wbr>org/listinfo/meta-<wbr>virtualization</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"</div>
</div></div>