Skip to contentSkip to conversation

libvirt: fix install error without qemu

PATCH In review Lavocat, Nicolas 2 participants 2 messages Aug 6, 2020 – Aug 8, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

---
 recipes-extended/libvirt/libvirt_6.1.0.bb | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
recipes-extended/libvirt/libvirt_6.1.0.bb +6 -4
index 9aa78b7..f301a0e 100644
@@ -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
 

--
2.18.0.129.ge333175

#1 lore raw
Quoted 11 lines · Nicolas

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.

Technically this patch needs to be against master, not an older branch. Changes merge to master first, and then we backport appropriately.

But the patch edit was trivial in this case, so I fixed it for master and have now pushed it for master and dunfell.

Bruce

Quoted 42 lines

Upstream-Status: Pending

---
 recipes-extended/libvirt/libvirt_6.1.0.bb | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
recipes-extended/libvirt/libvirt_6.1.0.bb +0 -1
index 9aa78b7..f301a0e 100644
@@ -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

recipes-extended/libvirt/libvirt_6.1.0.bb +1 -1
-                       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

recipes-extended/libvirt/libvirt_6.1.0.bb +2 -1
+                               break
+                       fi
                        ;;
        esac
 
--

2.18.0.129.ge333175

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end
- "Use the force Harry" - Gandalf, Star Trek II