Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 399369 - net-dns/avahi USE=python should split bindings (and not unconditionally require dev-python/pygtk)
Summary: net-dns/avahi USE=python should split bindings (and not unconditionally requi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 222601 420551
  Show dependency tree
 
Reported: 2012-01-19 10:48 UTC by Antoine Martin
Modified: 2013-05-28 02:22 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Martin 2012-01-19 10:48:41 UTC
All distros split avahi and avahi-ui, we should be able to install the avahi python bindings on a server without needing gtk and its plethora of dependencies. (like building openssh without X)

The fix is relatively simple: if USE="python -gtk", then skip the avahi gtk ui application which is not part of the bindings (it is python AND gtk)

There is *nothing* in the python bindings that requires gtk, just glib/python-dbus.

This would mitigate some other bugs: no circular dependency since it is not needed in most cases (comment 20 suggests the same thing):
https://bugs.gentoo.org/show_bug.cgi?id=222601#c20
And the bug where I originally reported this problem, since the warning says "For proper python support you should also enable the dbus and gtk USE flags!", in reality the bindings are totally unusable without USE="gtk" at present:
https://bugs.gentoo.org/show_bug.cgi?id=394125


Reproducible: Always

Steps to Reproduce:
1. Building with 'USE="python -gtk" emerge avahi' gives you a non-functional python bindings installation
2. Building with 'USE="python gtk" emerge avahi' works, but brings tons of unused/unnecessary dependencies for server.
Actual Results:  
For details, see:
https://bugs.gentoo.org/show_bug.cgi?id=394125


Expected Results:  
Python bindings to be installed correctly, but not the UI application which needs gtk (unless USE="gtk" is set).
Comment 1 Anthony Basile gentoo-dev 2013-01-19 17:49:03 UTC
(In reply to comment #0)
> All distros split avahi and avahi-ui, we should be able to install the avahi
> python bindings on a server without needing gtk and its plethora of
> dependencies. (like building openssh without X)
> 
> The fix is relatively simple: if USE="python -gtk", then skip the avahi gtk
> ui application which is not part of the bindings (it is python AND gtk)
> 
> There is *nothing* in the python bindings that requires gtk, just
> glib/python-dbus.
> 
> This would mitigate some other bugs: no circular dependency since it is not
> needed in most cases (comment 20 suggests the same thing):
> https://bugs.gentoo.org/show_bug.cgi?id=222601#c20
> And the bug where I originally reported this problem, since the warning says
> "For proper python support you should also enable the dbus and gtk USE
> flags!", in reality the bindings are totally unusable without USE="gtk" at
> present:
> https://bugs.gentoo.org/show_bug.cgi?id=394125
> 
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> 1. Building with 'USE="python -gtk" emerge avahi' gives you a non-functional
> python bindings installation
> 2. Building with 'USE="python gtk" emerge avahi' works, but brings tons of
> unused/unnecessary dependencies for server.
> Actual Results:  
> For details, see:
> https://bugs.gentoo.org/show_bug.cgi?id=394125
> 
> 
> Expected Results:  
> Python bindings to be installed correctly, but not the UI application which
> needs gtk (unless USE="gtk" is set).


This bug is a bit old, and I just inherited this package.  Is this something you still want?
Comment 2 Antoine Martin 2013-01-25 05:33:11 UTC
Yes, like I said, it is sad that debian does the right thing and that under gentoo it is impossible to have the mdns python bindings without bringing a GUI with it (gtk and all its dependencies - even minimal ones are huge), as mdns has nothing to do with GUIs.
Comment 3 Anthony Basile gentoo-dev 2013-05-28 02:20:59 UTC
(In reply to Antoine Martin from comment #2)
> Yes, like I said, it is sad that debian does the right thing and that under
> gentoo it is impossible to have the mdns python bindings without bringing a
> GUI with it (gtk and all its dependencies - even minimal ones are huge), as
> mdns has nothing to do with GUIs.

this should be fixed in avahi-0.6.31-r2.  The problem was a confusion about what was meant by building "python" support:

1) the python bindings only require dbus and gdbm

2) the python based programs, eg avahi-discover, require dbus, gdbm and gtk.

Both are housed under avahi-python but the bindings are under avahi-python/avahi while the utility is under avahi-python/avahi-discover.

Its a pretty messy build system and there's some very deceptive line in the configure.ac.  This is only true for 2.  Also, this line doesn't actually *do* anything, it just part of an informational print!


BUILD_PYTHON="no   (You need python, pygtk and python-dbus!)"

if test "x$BUILD_DAEMON" = "xyes" -a "x$HAVE_DBUS" = "xyes" -a "x$HAVE_PYTHON" = "xyes" -a "x$HAVE_PYTHON_DBUS" = "xyes" -a "x$HAVE_PYGTK" = "xyes" ; then
    BUILD_PYTHON=yes
fi

....

Building avahi-python:              ${BUILD_PYTHON}


Who codes like that!  Anyhow, please test avahi-0.6.31-r2 with USE="-* python gdbm dbus" and see that you don't get the gtk deps pulled in.
Comment 4 Anthony Basile gentoo-dev 2013-05-28 02:22:26 UTC
Actually, let's close this, and reopen if its still a problem.