libvirt: fix install error without qemu

An error occurs during the install step of libvirt when the variable
PACKAGECONFIG does not contain qemu.

Indeed, in this case, the operation "chown -R qemu:qemu
${D}/${localstatedir}/lib/libvirt/qemu" fails, since the folder
${D}/${localstatedir}/lib/libvirt/qemu has not been created.

The fix consist in doing this operation only if
the variable “PACKAGECONFIG” contains “qemu”.
remark: issue present since the Warrior release of yocto.

Upstream-Status: Pending

Signed-off-by: Nicolas Lavocat <nicolas.lavocat@harman.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
Lavocat, Nicolas 2020-08-06 10:38:59 +02:00 committed by Bruce Ashfield
parent 0db3901a48
commit ba6143a680

View File

@ -340,10 +340,12 @@ do_install_append() {
break
;;
*)
chown -R qemu:qemu ${D}/${localstatedir}/lib/libvirt/qemu
echo "d qemu qemu 0755 ${localstatedir}/cache/libvirt/qemu none" \
>> ${D}${sysconfdir}/default/volatiles/99_libvirt
break
if ${@bb.utils.contains('PACKAGECONFIG', 'qemu', 'true', 'false', d)}; then
chown -R qemu:qemu ${D}/${localstatedir}/lib/libvirt/qemu
echo "d qemu qemu 0755 ${localstatedir}/cache/libvirt/qemu none" \
>> ${D}${sysconfdir}/default/volatiles/99_libvirt
break
fi
;;
esac