Skip to contentSkip to conversation

meta-virt/libvirt: fix libvirt-python QA warnings

PATCH In review Yao Zhao 2 participants 3 messages Apr 19, 2013 – May 2, 2013

lore
Share & tools
lore

Yao Zhao

author
#0 lore raw

PATCH 1/1 meta-virt/libvirt: fix libvirt-python QA warnings

remove python_incdir.patch and inherit pythonnative. use PACKAGECONFIG instead of EXTRA_OECONF. enable python in full PACKAGECONFIG.
put *.la into ${PN}-dev and *.a into ${PN}-staticdev.

---
 recipes-extended/libvirt/libvirt-python.inc        |   21 +++---
 .../libvirt/libvirt/python_incdir.patch            |   68 --------------------
 recipes-extended/libvirt/libvirt_1.0.3.bb          |   18 ++++--
 3 files changed, 26 insertions(+), 81 deletions(-)
 delete mode 100644 recipes-extended/libvirt/libvirt/python_incdir.patch
recipes-extended/libvirt/libvirt-python.inc +12 -9
index 49d15fb..d4cc5f3 100644
@@ -1,14 +1,17 @@
-inherit python-dir
+inherit pythonnative python-dir
 
-# Enable the Python tool support
-EXTRA_OECONF += "--with-python=yes --with-python-inc-dir=-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}"
+export STAGING_INCDIR
+export STAGING_LIBDIR
+export BUILD_SYS 
+export HOST_SYS
 
-SRC_URI += " file://python_incdir.patch"
-
-DEPENDS  += "python python-native"
+PACKAGECONFIG += "python"
+PACKAGECONFIG[python] = "--with-python,--without-python,python,"
 RDEPENDS_${PN}-python += "python"
 PACKAGECONFIG_${PN}-python[xen] = ",,,xen-python"
 
-PACKAGES += "${PN}-python-dbg ${PN}-python"
-FILES_${PN}-python-dbg += "${libdir}/${PYTHON_DIR}/dist-packages/.debug/"
-FILES_${PN}-python += "${libdir}/${PYTHON_DIR}/dist-packages"
+PACKAGES += "${PN}-python-staticdev ${PN}-python-dev ${PN}-python-dbg ${PN}-python"
+FILES_${PN}-python-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
+FILES_${PN}-python-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
+FILES_${PN}-python-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/"
+FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}"
recipes-extended/libvirt/libvirt/python_incdir.patch deleted +0 -68

68 lines not on this page · raw message

recipes-extended/libvirt/libvirt_1.0.3.bb +14 -4
index 497d194..9d32fe0 100644
@@ -3,7 +3,7 @@ HOMEPAGE = "http://libvirt.org"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=fb919cc88dbe06ec0b0bd50e001ccf1f"
 SECTION = "console/tools"
-PR = "r0"
+PR = "r1"
 
 DEPENDS = "bridge-utils gnutls libxml2 lvm2 avahi parted curl libpcap util-linux e2fsprogs pm-utils \
 	   iptables ebtables dnsmasq readline"
@@ -94,8 +94,18 @@ FILES_${PN} += "${libdir}/libvirt/connection-driver \
 	    ${datadir}/augeas \
 	    ${datadir}/polkit-1"
 
-FILES_${PN}-dbg += "${libdir}/libvirt/connection-driver/.debug"
-FILES_${PN}-staticdev += "${libdir}/*.a ${libdir}/libvirt/connection-driver/*.a"
+FILES_${PN}-dbg += "\
+	${libdir}/libvirt/connection-driver/.debug \
+	${libdir}/libvirt/lock-driver/.debug \
+"
+FILES_${PN}-staticdev += "${libdir}/*.a \
+	${libdir}/libvirt/connection-driver/*.a \
+	${libdir}/libvirt/lock-driver/*.a \
+"
+FILES_${PN}-dev += "\
+	${libdir}/libvirt/connection-driver/*.la \
+	${libdir}/libvirt/lock-driver/*.la \
+"
 
 INITSCRIPT_PACKAGES = "${PN}-libvirtd"
 INITSCRIPT_NAME_${PN}-libvirtd = "libvirtd"
@@ -106,7 +116,7 @@ INITSCRIPT_PARAMS_${PN}-libvirtd = "defaults 72"
 
 # full config
 PACKAGECONFIG ??= "qemu yajl xen libxl xen-inotify uml openvz vmware vbox esx \
-	           polkit lxc test remote macvtap libvirtd netcf"
+	           polkit lxc test remote macvtap libvirtd netcf python"
 
 # enable,disable,depends,rdepends
 #
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 4 lines · Yao Zhao

remove python_incdir.patch and inherit pythonnative. use PACKAGECONFIG instead of EXTRA_OECONF. enable python in full PACKAGECONFIG.
put *.la into ${PN}-dev and *.a into ${PN}-staticdev.

No one has complained, so I've grabbed this patch and will push it out shortly.

Bruce

Quoted 160 lines
---
 recipes-extended/libvirt/libvirt-python.inc        |   21 +++---
 .../libvirt/libvirt/python_incdir.patch            |   68 --------------------
 recipes-extended/libvirt/libvirt_1.0.3.bb          |   18 ++++--
 3 files changed, 26 insertions(+), 81 deletions(-)
 delete mode 100644 recipes-extended/libvirt/libvirt/python_incdir.patch
recipes-extended/libvirt/libvirt-python.inc +12 -9
index 49d15fb..d4cc5f3 100644
@@ -1,14 +1,17 @@
-inherit python-dir
+inherit pythonnative python-dir
 
-# Enable the Python tool support
-EXTRA_OECONF += "--with-python=yes --with-python-inc-dir=-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}"
+export STAGING_INCDIR
+export STAGING_LIBDIR
+export BUILD_SYS
+export HOST_SYS
 
-SRC_URI += " file://python_incdir.patch"
-
-DEPENDS  += "python python-native"
+PACKAGECONFIG += "python"
+PACKAGECONFIG[python] = "--with-python,--without-python,python,"
 RDEPENDS_${PN}-python += "python"
 PACKAGECONFIG_${PN}-python[xen] = ",,,xen-python"
 
-PACKAGES += "${PN}-python-dbg ${PN}-python"
-FILES_${PN}-python-dbg += "${libdir}/${PYTHON_DIR}/dist-packages/.debug/"
-FILES_${PN}-python += "${libdir}/${PYTHON_DIR}/dist-packages"
+PACKAGES += "${PN}-python-staticdev ${PN}-python-dev ${PN}-python-dbg ${PN}-python"
+FILES_${PN}-python-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
+FILES_${PN}-python-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
+FILES_${PN}-python-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/"
+FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}"
recipes-extended/libvirt/libvirt/python_incdir.patch deleted +0 -68
deleted file mode 100644
index 6c77b09..0000000
@@ -1,68 +0,0 @@
-Index: libvirt-0.10.2/configure.ac
-===================================================================
---- libvirt-0.10.2.orig/configure.ac   2012-10-29 11:59:27.091615491 +0200
-+++ libvirt-0.10.2/configure.ac        2012-10-29 12:09:50.067603647 +0200
-@@ -2397,6 +2397,11 @@
-
- PYTHON_VERSION=
- PYTHON_INCLUDES=
-+
-+AC_ARG_WITH(python-inc-dir,
-+  AS_HELP_STRING([--with-python-inc-dir=DIR], [directory with Python include files]),
-+   [PYTHON_INCLUDES="${withval}"], [])
-+
- if test "$with_python" != "no" ; then
-     if test -x "$with_python/bin/python"
-     then
-@@ -2422,29 +2427,30 @@
-         AM_PATH_PYTHON(,, [:])
-
-         if test "$PYTHON" != : ; then
--            PYTHON_CONFIG="$PYTHON-config"
--
--            if test -x "$PYTHON_CONFIG"
--            then
--                PYTHON_INCLUDES=`$PYTHON_CONFIG --includes`
--            else
--                if test -r $PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION/Python.h
--                then
--                    PYTHON_INCLUDES=-I$PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION
--                else
--                    if test -r $prefix/include/python$PYTHON_VERSION/Python.h
--                    then
--                        PYTHON_INCLUDES=-I$prefix/include/python$PYTHON_VERSION
--                    else
--                        if test -r /usr/include/python$PYTHON_VERSION/Python.h
--                        then
--                            PYTHON_INCLUDES=-I/usr/include/python$PYTHON_VERSION
--                        else
--                            AC_MSG_ERROR([You must install python-devel to build Python bindings])
--                        fi
-+            if ! test -n "$PYTHON_INCLUDES"; then
-+              PYTHON_CONFIG="$PYTHON-config"
-+              if test -x "$PYTHON_CONFIG"
-+              then
-+                  PYTHON_INCLUDES=`$PYTHON_CONFIG --includes`
-+              else
-+                  if test -r $PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION/Python.h
-+                  then
-+                      PYTHON_INCLUDES=-I$PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION
-+                  else
-+                      if test -r $prefix/include/python$PYTHON_VERSION/Python.h
-+                      then
-+                          PYTHON_INCLUDES=-I$prefix/include/python$PYTHON_VERSION
-+                      else
-+                          if test -r /usr/include/python$PYTHON_VERSION/Python.h
-+                          then
-+                              PYTHON_INCLUDES=-I/usr/include/python$PYTHON_VERSION
-+                          else
-+                              AC_MSG_ERROR([You must install python-devel to build Python bindings])
-+                          fi
-+                       fi
-                     fi
-                 fi
--            fi
-+             fi
-         else
-             AC_MSG_ERROR([You must install python to build Python bindings])
-         fi
recipes-extended/libvirt/libvirt_1.0.3.bb +14 -5
index 497d194..9d32fe0 100644
@@ -3,7 +3,7 @@ HOMEPAGE = "http://libvirt.org"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=fb919cc88dbe06ec0b0bd50e001ccf1f"
 SECTION = "console/tools"
-PR = "r0"
+PR = "r1"
 
 DEPENDS = "bridge-utils gnutls libxml2 lvm2 avahi parted curl libpcap util-linux e2fsprogs pm-utils \
           iptables ebtables dnsmasq readline"
@@ -94,8 +94,18 @@ FILES_${PN} += "${libdir}/libvirt/connection-driver \
            ${datadir}/augeas \
            ${datadir}/polkit-1"
 
-FILES_${PN}-dbg += "${libdir}/libvirt/connection-driver/.debug"
-FILES_${PN}-staticdev += "${libdir}/*.a ${libdir}/libvirt/connection-driver/*.a"
+FILES_${PN}-dbg += "\
+       ${libdir}/libvirt/connection-driver/.debug \
+       ${libdir}/libvirt/lock-driver/.debug \
+"
+FILES_${PN}-staticdev += "${libdir}/*.a \
+       ${libdir}/libvirt/connection-driver/*.a \
+       ${libdir}/libvirt/lock-driver/*.a \
+"
+FILES_${PN}-dev += "\
+       ${libdir}/libvirt/connection-driver/*.la \
+       ${libdir}/libvirt/lock-driver/*.la \
+"
 
 INITSCRIPT_PACKAGES = "${PN}-libvirtd"
 INITSCRIPT_NAME_${PN}-libvirtd = "libvirtd"
@@ -106,7 +116,7 @@ INITSCRIPT_PARAMS_${PN}-libvirtd = "defaults 72"
 
 # full config
 PACKAGECONFIG ??= "qemu yajl xen libxl xen-inotify uml openvz vmware vbox esx \
-                  polkit lxc test remote macvtap libvirtd netcf"
+                  polkit lxc test remote macvtap libvirtd netcf python"
 
 # enable,disable,depends,rdepends
 #
--

1.7.10.4

Quoted 4 lines

_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"

#2 lore raw
Quoted 8 lines · Bruce Ashfield
Quoted 4 lines · Yao Zhao

remove python_incdir.patch and inherit pythonnative. use PACKAGECONFIG instead of EXTRA_OECONF. enable python in full PACKAGECONFIG.
put *.la into ${PN}-dev and *.a into ${PN}-staticdev.

No one has complained, so I've grabbed this patch and will push it out shortly.

I spoke to soon. We've merged other changes since you spun this patch, so it no longer applies cleanly.

I could just fix it up, but I'd rather get you to rebase it onto the latest and resubmit. That way we won't risk an unintended side effect.

Bruce

Quoted 162 lines

Bruce

Quoted 160 lines
---
 recipes-extended/libvirt/libvirt-python.inc        |   21 +++---
 .../libvirt/libvirt/python_incdir.patch            |   68 --------------------
 recipes-extended/libvirt/libvirt_1.0.3.bb          |   18 ++++--
 3 files changed, 26 insertions(+), 81 deletions(-)
 delete mode 100644 recipes-extended/libvirt/libvirt/python_incdir.patch
recipes-extended/libvirt/libvirt-python.inc +12 -9
index 49d15fb..d4cc5f3 100644
@@ -1,14 +1,17 @@
-inherit python-dir
+inherit pythonnative python-dir
 
-# Enable the Python tool support
-EXTRA_OECONF += "--with-python=yes --with-python-inc-dir=-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}"
+export STAGING_INCDIR
+export STAGING_LIBDIR
+export BUILD_SYS
+export HOST_SYS
 
-SRC_URI += " file://python_incdir.patch"
-
-DEPENDS  += "python python-native"
+PACKAGECONFIG += "python"
+PACKAGECONFIG[python] = "--with-python,--without-python,python,"
 RDEPENDS_${PN}-python += "python"
 PACKAGECONFIG_${PN}-python[xen] = ",,,xen-python"
 
-PACKAGES += "${PN}-python-dbg ${PN}-python"
-FILES_${PN}-python-dbg += "${libdir}/${PYTHON_DIR}/dist-packages/.debug/"
-FILES_${PN}-python += "${libdir}/${PYTHON_DIR}/dist-packages"
+PACKAGES += "${PN}-python-staticdev ${PN}-python-dev ${PN}-python-dbg ${PN}-python"
+FILES_${PN}-python-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
+FILES_${PN}-python-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
+FILES_${PN}-python-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/"
+FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}"
recipes-extended/libvirt/libvirt/python_incdir.patch deleted +0 -68
deleted file mode 100644
index 6c77b09..0000000
@@ -1,68 +0,0 @@
-Index: libvirt-0.10.2/configure.ac
-===================================================================
---- libvirt-0.10.2.orig/configure.ac   2012-10-29 11:59:27.091615491 +0200
-+++ libvirt-0.10.2/configure.ac        2012-10-29 12:09:50.067603647 +0200
-@@ -2397,6 +2397,11 @@
-
- PYTHON_VERSION=
- PYTHON_INCLUDES=
-+
-+AC_ARG_WITH(python-inc-dir,
-+  AS_HELP_STRING([--with-python-inc-dir=DIR], [directory with Python include files]),
-+   [PYTHON_INCLUDES="${withval}"], [])
-+
- if test "$with_python" != "no" ; then
-     if test -x "$with_python/bin/python"
-     then
-@@ -2422,29 +2427,30 @@
-         AM_PATH_PYTHON(,, [:])
-
-         if test "$PYTHON" != : ; then
--            PYTHON_CONFIG="$PYTHON-config"
--
--            if test -x "$PYTHON_CONFIG"
--            then
--                PYTHON_INCLUDES=`$PYTHON_CONFIG --includes`
--            else
--                if test -r $PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION/Python.h
--                then
--                    PYTHON_INCLUDES=-I$PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION
--                else
--                    if test -r $prefix/include/python$PYTHON_VERSION/Python.h
--                    then
--                        PYTHON_INCLUDES=-I$prefix/include/python$PYTHON_VERSION
--                    else
--                        if test -r /usr/include/python$PYTHON_VERSION/Python.h
--                        then
--                            PYTHON_INCLUDES=-I/usr/include/python$PYTHON_VERSION
--                        else
--                            AC_MSG_ERROR([You must install python-devel to build Python bindings])
--                        fi
-+            if ! test -n "$PYTHON_INCLUDES"; then
-+              PYTHON_CONFIG="$PYTHON-config"
-+              if test -x "$PYTHON_CONFIG"
-+              then
-+                  PYTHON_INCLUDES=`$PYTHON_CONFIG --includes`
-+              else
-+                  if test -r $PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION/Python.h
-+                  then
-+                      PYTHON_INCLUDES=-I$PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION
-+                  else
-+                      if test -r $prefix/include/python$PYTHON_VERSION/Python.h
-+                      then
-+                          PYTHON_INCLUDES=-I$prefix/include/python$PYTHON_VERSION
-+                      else
-+                          if test -r /usr/include/python$PYTHON_VERSION/Python.h
-+                          then
-+                              PYTHON_INCLUDES=-I/usr/include/python$PYTHON_VERSION
-+                          else
-+                              AC_MSG_ERROR([You must install python-devel to build Python bindings])
-+                          fi
-+                       fi
-                     fi
-                 fi
--            fi
-+             fi
-         else
-             AC_MSG_ERROR([You must install python to build Python bindings])
-         fi
recipes-extended/libvirt/libvirt_1.0.3.bb +14 -5
index 497d194..9d32fe0 100644
@@ -3,7 +3,7 @@ HOMEPAGE = "http://libvirt.org"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=fb919cc88dbe06ec0b0bd50e001ccf1f"
 SECTION = "console/tools"
-PR = "r0"
+PR = "r1"
 
 DEPENDS = "bridge-utils gnutls libxml2 lvm2 avahi parted curl libpcap util-linux e2fsprogs pm-utils \
           iptables ebtables dnsmasq readline"
@@ -94,8 +94,18 @@ FILES_${PN} += "${libdir}/libvirt/connection-driver \
            ${datadir}/augeas \
            ${datadir}/polkit-1"
 
-FILES_${PN}-dbg += "${libdir}/libvirt/connection-driver/.debug"
-FILES_${PN}-staticdev += "${libdir}/*.a ${libdir}/libvirt/connection-driver/*.a"
+FILES_${PN}-dbg += "\
+       ${libdir}/libvirt/connection-driver/.debug \
+       ${libdir}/libvirt/lock-driver/.debug \
+"
+FILES_${PN}-staticdev += "${libdir}/*.a \
+       ${libdir}/libvirt/connection-driver/*.a \
+       ${libdir}/libvirt/lock-driver/*.a \
+"
+FILES_${PN}-dev += "\
+       ${libdir}/libvirt/connection-driver/*.la \
+       ${libdir}/libvirt/lock-driver/*.la \
+"
 
 INITSCRIPT_PACKAGES = "${PN}-libvirtd"
 INITSCRIPT_NAME_${PN}-libvirtd = "libvirtd"
@@ -106,7 +116,7 @@ INITSCRIPT_PARAMS_${PN}-libvirtd = "defaults 72"
 
 # full config
 PACKAGECONFIG ??= "qemu yajl xen libxl xen-inotify uml openvz vmware vbox esx \
-                  polkit lxc test remote macvtap libvirtd netcf"
+                  polkit lxc test remote macvtap libvirtd netcf python"
 
 # enable,disable,depends,rdepends
 #
--

1.7.10.4

Quoted 10 lines
Quoted 4 lines

_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"

--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"