summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Hochstein <tom.hochstein@oss.nxp.com>2025-11-06 10:11:30 -0600
committerBruce Ashfield <bruce.ashfield@gmail.com>2025-11-19 18:22:50 -0500
commitd54989cbee9fd845d47a4696360500ce25b4dfd4 (patch)
treec90564fa7302f3d35c5e71463d495b2aa2eaa202
parentc2185cd5ef225c6606341745ad9ffb02efe364d9 (diff)
downloadmeta-virtualization-d54989cbee9fd845d47a4696360500ce25b4dfd4.tar.gz
libvirt: Fix missing libvirt-python
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> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--recipes-extended/libvirt/libvirt-python.inc22
1 files 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}/*"
18# Currently the libvirt-python debug libraries contain buildpaths 18# Currently the libvirt-python debug libraries contain buildpaths
19INSANE_SKIP:${PN}-dbg += "buildpaths" 19INSANE_SKIP:${PN}-dbg += "buildpaths"
20 20
21SRC_URI += "http://libvirt.org/sources/python/${BPN}_python-${LIBVIRT_VERSION}.tar.gz;name=libvirt_python;subdir=${BP}" 21SRC_URI += "http://libvirt.org/sources/python/${LIBVIRT_PYTHON_ARCHIVE_NAME}.tar.gz;name=libvirt_python;subdir=${BP}"
22 22LIBVIRT_PYTHON_ARCHIVE_NAME = "${BPN}_python-${LIBVIRT_VERSION}"
23SRC_URI[libvirt_python.sha256sum] = "5d80e13e0cfb96dd254d765ee60e77e5f9b6925172540056cec0aa0e6f0ca83c" 23SRC_URI[libvirt_python.sha256sum] = "5d80e13e0cfb96dd254d765ee60e77e5f9b6925172540056cec0aa0e6f0ca83c"
24 24
25export LIBVIRT_API_PATH = "${S}/docs/libvirt-api.xml" 25export LIBVIRT_API_PATH = "${S}/docs/libvirt-api.xml"
@@ -46,8 +46,12 @@ do_compile:append() {
46 # the syroot staged pkgconfig entries. So we clear the sysroot 46 # the syroot staged pkgconfig entries. So we clear the sysroot
47 # for just this portion. 47 # for just this portion.
48 export PKG_CONFIG_SYSROOT_DIR= 48 export PKG_CONFIG_SYSROOT_DIR=
49 cd ${UNPACKDIR}/${BP}/${BPN}-python-${LIBVIRT_VERSION} && \ 49 src=${UNPACKDIR}/${BP}/${LIBVIRT_PYTHON_ARCHIVE_NAME}
50 ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py build 50 if [ ! -d $src ]; then
51 bbfatal "Python source not found at expected location \"$src\". Please check that this task logic and SRC_URI are consistent."
52 fi
53 cd $src
54 ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py build
51 cd - 55 cd -
52 fi 56 fi
53} 57}
@@ -58,9 +62,13 @@ do_install:append() {
58 # the syroot staged pkgconfig entries. So we clear the sysroot 62 # the syroot staged pkgconfig entries. So we clear the sysroot
59 # for just this portion. 63 # for just this portion.
60 export PKG_CONFIG_SYSROOT_DIR= 64 export PKG_CONFIG_SYSROOT_DIR=
61 cd ${UNPACKDIR}/${BP}/${BPN}-python-${LIBVIRT_VERSION} && \ 65 src=${UNPACKDIR}/${BP}/${LIBVIRT_PYTHON_ARCHIVE_NAME}
62 ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py install \ 66 if [ ! -d $src ]; then
63 --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${LIBVIRT_INSTALL_ARGS} 67 bbfatal "Python source not found at expected location \"$src\". Please check that this task logic and SRC_URI are consistent."
68 fi
69 cd $src
70 ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py install \
71 --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${LIBVIRT_INSTALL_ARGS}
64 cd - 72 cd -
65 fi 73 fi
66} 74}