All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-virtualization][PATCH v3] libvirt: Fix missing libvirt-python
@ 2025-11-06 16:11 Tom Hochstein (OSS)
  2025-11-19 23:23 ` Bruce Ashfield
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Hochstein (OSS) @ 2025-11-06 16:11 UTC (permalink / raw)
  To: meta-virtualization; +Cc: Tom Hochstein

From: Tom Hochstein <tom.hochstein@oss.nxp.com>

The do_rootfs task for an image that includes libvirt-python fails.
```
  - nothing provides libvirt-python needed by packagegroup-fsl-virtualization-1.0-r0.ls1012afrwy from oe-repo
```

The log shows that the do_compile:append() from libvirt-python.inc is
failing but not reporting the failure.
```
174: cd: can't cd to /.../libvirt/v11.8.0+git/sources/libvirt-v11.8.0+git/libvirt-python-11.8.0
```

The root cause is the archive folder format is changed from
libvirt-python-VERSION to libvirt_python-VERSION, but the do_compile
and do_install tasks are hard-coded to the old format.

Fix the root cause by encoding the archive folder name in a common
variable. Also, fix the build and install commands so the cd failure is
not ignored.

Signed-off-by: Tom Hochstein <tom.hochstein@oss.nxp.com>
---
 recipes-extended/libvirt/libvirt-python.inc | 22 ++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/recipes-extended/libvirt/libvirt-python.inc b/recipes-extended/libvirt/libvirt-python.inc
index c430ffe5..b8c8656b 100644
--- a/recipes-extended/libvirt/libvirt-python.inc
+++ b/recipes-extended/libvirt/libvirt-python.inc
@@ -18,8 +18,8 @@ FILES:${PN}-python = "${bindir}/* ${libdir}/* ${libdir}/${PYTHON_DIR}/*"
 # Currently the libvirt-python debug libraries contain buildpaths
 INSANE_SKIP:${PN}-dbg += "buildpaths"
 
-SRC_URI += "http://libvirt.org/sources/python/${BPN}_python-${LIBVIRT_VERSION}.tar.gz;name=libvirt_python;subdir=${BP}"
-
+SRC_URI += "http://libvirt.org/sources/python/${LIBVIRT_PYTHON_ARCHIVE_NAME}.tar.gz;name=libvirt_python;subdir=${BP}"
+LIBVIRT_PYTHON_ARCHIVE_NAME = "${BPN}_python-${LIBVIRT_VERSION}"
 SRC_URI[libvirt_python.sha256sum] = "5d80e13e0cfb96dd254d765ee60e77e5f9b6925172540056cec0aa0e6f0ca83c"
 
 export LIBVIRT_API_PATH = "${S}/docs/libvirt-api.xml"
@@ -46,8 +46,12 @@ do_compile:append() {
 		# the syroot staged pkgconfig entries. So we clear the sysroot
 		# for just this portion.
 		export PKG_CONFIG_SYSROOT_DIR=
-		cd ${UNPACKDIR}/${BP}/${BPN}-python-${LIBVIRT_VERSION} && \
-		  ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py build
+		src=${UNPACKDIR}/${BP}/${LIBVIRT_PYTHON_ARCHIVE_NAME}
+		if [ ! -d $src ]; then
+			bbfatal "Python source not found at expected location \"$src\". Please check that this task logic and SRC_URI are consistent."
+		fi
+		cd $src
+		${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py build
 		cd -
 	fi
 }
@@ -58,9 +62,13 @@ do_install:append() {
 		# the syroot staged pkgconfig entries. So we clear the sysroot
 		# for just this portion.
 		export PKG_CONFIG_SYSROOT_DIR=
-		cd ${UNPACKDIR}/${BP}/${BPN}-python-${LIBVIRT_VERSION} && \
-		  ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py install \
-                       --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${LIBVIRT_INSTALL_ARGS}
+		src=${UNPACKDIR}/${BP}/${LIBVIRT_PYTHON_ARCHIVE_NAME}
+		if [ ! -d $src ]; then
+			bbfatal "Python source not found at expected location \"$src\". Please check that this task logic and SRC_URI are consistent."
+		fi
+		cd $src
+		${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py install \
+			--install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${LIBVIRT_INSTALL_ARGS}
 		cd -
 	fi
 }
-- 
2.34.1



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

* Re: [meta-virtualization][PATCH v3] libvirt: Fix missing libvirt-python
  2025-11-06 16:11 [meta-virtualization][PATCH v3] libvirt: Fix missing libvirt-python Tom Hochstein (OSS)
@ 2025-11-19 23:23 ` Bruce Ashfield
  0 siblings, 0 replies; 2+ messages in thread
From: Bruce Ashfield @ 2025-11-19 23:23 UTC (permalink / raw)
  To: tom.hochstein; +Cc: meta-virtualization

Sorry for the delay, I've been really focused on some larger container
stack runtime issues that have been consuming all my time.

I've merged this to master-next.

Bruce

In message: [meta-virtualization][PATCH v3] libvirt: Fix missing libvirt-python
on 06/11/2025 Tom Hochstein via lists.yoctoproject.org wrote:

> From: Tom Hochstein <tom.hochstein@oss.nxp.com>
> 
> The do_rootfs task for an image that includes libvirt-python fails.
> ```
>   - nothing provides libvirt-python needed by packagegroup-fsl-virtualization-1.0-r0.ls1012afrwy from oe-repo
> ```
> 
> The log shows that the do_compile:append() from libvirt-python.inc is
> failing but not reporting the failure.
> ```
> 174: cd: can't cd to /.../libvirt/v11.8.0+git/sources/libvirt-v11.8.0+git/libvirt-python-11.8.0
> ```
> 
> The root cause is the archive folder format is changed from
> libvirt-python-VERSION to libvirt_python-VERSION, but the do_compile
> and do_install tasks are hard-coded to the old format.
> 
> Fix the root cause by encoding the archive folder name in a common
> variable. Also, fix the build and install commands so the cd failure is
> not ignored.
> 
> Signed-off-by: Tom Hochstein <tom.hochstein@oss.nxp.com>
> ---
>  recipes-extended/libvirt/libvirt-python.inc | 22 ++++++++++++++-------
>  1 file changed, 15 insertions(+), 7 deletions(-)
> 
> diff --git a/recipes-extended/libvirt/libvirt-python.inc b/recipes-extended/libvirt/libvirt-python.inc
> index c430ffe5..b8c8656b 100644
> --- a/recipes-extended/libvirt/libvirt-python.inc
> +++ b/recipes-extended/libvirt/libvirt-python.inc
> @@ -18,8 +18,8 @@ FILES:${PN}-python = "${bindir}/* ${libdir}/* ${libdir}/${PYTHON_DIR}/*"
>  # Currently the libvirt-python debug libraries contain buildpaths
>  INSANE_SKIP:${PN}-dbg += "buildpaths"
>  
> -SRC_URI += "http://libvirt.org/sources/python/${BPN}_python-${LIBVIRT_VERSION}.tar.gz;name=libvirt_python;subdir=${BP}"
> -
> +SRC_URI += "http://libvirt.org/sources/python/${LIBVIRT_PYTHON_ARCHIVE_NAME}.tar.gz;name=libvirt_python;subdir=${BP}"
> +LIBVIRT_PYTHON_ARCHIVE_NAME = "${BPN}_python-${LIBVIRT_VERSION}"
>  SRC_URI[libvirt_python.sha256sum] = "5d80e13e0cfb96dd254d765ee60e77e5f9b6925172540056cec0aa0e6f0ca83c"
>  
>  export LIBVIRT_API_PATH = "${S}/docs/libvirt-api.xml"
> @@ -46,8 +46,12 @@ do_compile:append() {
>  		# the syroot staged pkgconfig entries. So we clear the sysroot
>  		# for just this portion.
>  		export PKG_CONFIG_SYSROOT_DIR=
> -		cd ${UNPACKDIR}/${BP}/${BPN}-python-${LIBVIRT_VERSION} && \
> -		  ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py build
> +		src=${UNPACKDIR}/${BP}/${LIBVIRT_PYTHON_ARCHIVE_NAME}
> +		if [ ! -d $src ]; then
> +			bbfatal "Python source not found at expected location \"$src\". Please check that this task logic and SRC_URI are consistent."
> +		fi
> +		cd $src
> +		${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py build
>  		cd -
>  	fi
>  }
> @@ -58,9 +62,13 @@ do_install:append() {
>  		# the syroot staged pkgconfig entries. So we clear the sysroot
>  		# for just this portion.
>  		export PKG_CONFIG_SYSROOT_DIR=
> -		cd ${UNPACKDIR}/${BP}/${BPN}-python-${LIBVIRT_VERSION} && \
> -		  ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py install \
> -                       --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${LIBVIRT_INSTALL_ARGS}
> +		src=${UNPACKDIR}/${BP}/${LIBVIRT_PYTHON_ARCHIVE_NAME}
> +		if [ ! -d $src ]; then
> +			bbfatal "Python source not found at expected location \"$src\". Please check that this task logic and SRC_URI are consistent."
> +		fi
> +		cd $src
> +		${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py install \
> +			--install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${LIBVIRT_INSTALL_ARGS}
>  		cd -
>  	fi
>  }
> -- 
> 2.34.1
> 

> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#9434): https://lists.yoctoproject.org/g/meta-virtualization/message/9434
> Mute This Topic: https://lists.yoctoproject.org/mt/116155486/1050810
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 



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

end of thread, other threads:[~2025-11-19 23:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-06 16:11 [meta-virtualization][PATCH v3] libvirt: Fix missing libvirt-python Tom Hochstein (OSS)
2025-11-19 23:23 ` 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.