Bug 198267 - net-print/cups-1.3.4 avahi useflag is broken
Bug#: 198267 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: printing@gentoo.org Reported By: flameeyes@gentoo.org
Component: Ebuilds
URL: 
Summary: net-print/cups-1.3.4 avahi useflag is broken
Keywords:  
Status Whiteboard: 
Opened: 2007-11-06 13:47 0000
Description:   Opened: 2007-11-06 13:47 0000
The avahi USE flag in that cups ebuild is broken and misused.

Misused because it states there's a dependency over either avahi or
mDNSResponder, so it's not *AVAHI* code that gets enabled, but *ZeroConf* code
(there's a zeroconf USE flag for that). Plus the dependency as is will skip
over mdns even if requested because avahi can be installed (and usually is)
without mdnsresponder-compat. In my case I didn't have mDNSResponder installed
either, but the dependency was still satisfied. The result is a cups with no
mdns support after building it with avahi USE flag enabled.

The solution is to replace the current avahi useflag with zeroconf, and then
add avahi as addition: when avahi is enabled avahi is dependend upon, and then
during pkg_setup there is a built_with_use check for mdnsresponder-compat; when
avahi is disabled, mDNSResponder is dependend upon. This results in a working
ebuild.

------- Comment #1 From Diego E. 'Flameeyes' Pettenò 2007-11-06 13:51:37 0000 -------
Ah, and you need at least for avahi to depend on avahi-daemon when you enable
it, which is another reason why || ( ) dependencies are NO-NO in this case.
Feel free to look at pulseaudio init script to get a way to make init script
dependencies conditional.

------- Comment #2 From Timo Gurr 2007-11-08 23:36:15 0000 -------
Fixed in CVS (cups-1.3.4-r1), thanks for reporting and help.