All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-virtualization][PATCH] libvirt: fix install error without qemu
@ 2020-08-06  8:38 Lavocat, Nicolas
  2020-08-08  2:20 ` Bruce Ashfield
  0 siblings, 1 reply; 2+ messages in thread
From: Lavocat, Nicolas @ 2020-08-06  8:38 UTC (permalink / raw)
  To: meta-virtualization; +Cc: Nicolas Lavocat

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

diff --git a/recipes-extended/libvirt/libvirt_6.1.0.bb b/recipes-extended/libvirt/libvirt_6.1.0.bb
index 9aa78b7..f301a0e 100644
--- a/recipes-extended/libvirt/libvirt_6.1.0.bb
+++ b/recipes-extended/libvirt/libvirt_6.1.0.bb
@@ -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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [meta-virtualization][PATCH] libvirt: fix install error without qemu
  2020-08-06  8:38 [meta-virtualization][PATCH] libvirt: fix install error without qemu Lavocat, Nicolas
@ 2020-08-08  2:20 ` Bruce Ashfield
  0 siblings, 0 replies; 2+ messages in thread
From: Bruce Ashfield @ 2020-08-08  2:20 UTC (permalink / raw)
  To: Lavocat, Nicolas; +Cc: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 2446 bytes --]

On Thu, Aug 6, 2020 at 4:39 AM Lavocat, Nicolas <Nicolas.Lavocat@harman.com>
wrote:

> 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



>
> Upstream-Status: Pending
>
> Signed-off-by: Nicolas Lavocat <nicolas.lavocat@harman.com>
> ---
>  recipes-extended/libvirt/libvirt_6.1.0.bb | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/recipes-extended/libvirt/libvirt_6.1.0.bb
> b/recipes-extended/libvirt/libvirt_6.1.0.bb
> index 9aa78b7..f301a0e 100644
> --- a/recipes-extended/libvirt/libvirt_6.1.0.bb
> +++ b/recipes-extended/libvirt/libvirt_6.1.0.bb
> @@ -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
>
> 
>


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

[-- Attachment #2: Type: text/html, Size: 4107 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-08  2:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-06  8:38 [meta-virtualization][PATCH] libvirt: fix install error without qemu Lavocat, Nicolas
2020-08-08  2:20 ` Bruce Ashfield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.