Patchwork [3/4] avahi: inherit python classes, use PACKAGECONFIG

login
register
mail settings
Submitter Christopher Larson
Date June 10, 2013, 8:46 p.m.
Message ID <41516af35242f86839c1afe0e9735061a2bdf5b0.1370896985.git.chris_larson@mentor.com>
Download mbox | patch
Permalink /patch/51443/
State Accepted
Commit 4599ef630c13224506671bf84569bfc240cd3032
Headers show

Comments

Christopher Larson - June 10, 2013, 8:46 p.m.
From: Christopher Larson <chris_larson@mentor.com>

Without using our python classes and having appropriate dependencies, the
build is nondeterministic, and whether a python-avahi package is produced will
vary depending on the host environment, yet avahi-discover is always produced,
and it depends on python-avahi.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/recipes-connectivity/avahi/avahi-ui_0.6.31.bb | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
Otavio Salvador - June 10, 2013, 8:58 p.m.
On Mon, Jun 10, 2013 at 5:46 PM, Christopher Larson <kergoth@gmail.com>wrote:

> From: Christopher Larson <chris_larson@mentor.com>
>
> Without using our python classes and having appropriate dependencies, the
> build is nondeterministic, and whether a python-avahi package is produced
> will
> vary depending on the host environment, yet avahi-discover is always
> produced,
> and it depends on python-avahi.
>
> Signed-off-by: Christopher Larson <chris_larson@mentor.com>
>

Reviewed-by: Otavio Salvador <otavio@ossystems.com.br>

This could be backported for 1.4.2 I think; Paul?

Patch

diff --git a/meta/recipes-connectivity/avahi/avahi-ui_0.6.31.bb b/meta/recipes-connectivity/avahi/avahi-ui_0.6.31.bb
index 7d56dad..557c1c1 100644
--- a/meta/recipes-connectivity/avahi/avahi-ui_0.6.31.bb
+++ b/meta/recipes-connectivity/avahi/avahi-ui_0.6.31.bb
@@ -6,6 +6,11 @@  LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
 
 require avahi.inc
 
+inherit python-dir pythonnative
+
+PACKAGECONFIG ??= "python"
+PACKAGECONFIG[python] = "--enable-python,--disable-python,python-native python"
+
 PR = "${INC_PR}.0"
 
 SRC_URI[md5sum] = "2f22745b8f7368ad5a0a3fddac343f2d"
@@ -26,7 +31,7 @@  FILES_${PN}-staticdev += "${libdir}/libavahi-ui.a"
 
 FILES_${PN}-utils = "${bindir}/b* ${datadir}/applications/b*"
 
-FILES_python-avahi = "${PYTHON_SITEPACKAGES_DIR}/avahi/*"
+FILES_python-avahi = "${PYTHON_SITEPACKAGES_DIR}/avahi ${PYTHON_SITEPACKAGES_DIR}/avahi_discover"
 FILES_avahi-discover = "${bindir}/avahi-discover \
                         ${datadir}/applications/avahi-discover.desktop \
                         ${datadir}/avahi/interfaces/avahi-discover*"
@@ -34,7 +39,7 @@  FILES_avahi-discover-standalone = "${bindir}/avahi-discover-standalone \
                                    ${datadir}/avahi/interfaces/avahi-discover.glade"
 
 RDEPENDS_avahi-discover = "python-avahi python-pygtk"
-RDEPENDS_python-avahi = "python-dbus"
+RDEPENDS_python-avahi = "python-core python-dbus"
 
 
 do_install_append () {