When trying to emerge sci-electronics/pcb with dbus enabled configure fails when both the gtk and the motif use flags are disabled, claiming that using --enable-dbus it requires either a GTK of motif GUI. Enabling either the gtk of motif use flags allows compilation to complete successfully. Reproducible: Always Steps to Reproduce: 1.enable the dbus use flag for pcb 2.diable the gtk and motif use flags for pcb 3.emerge pcb Actual Results: emerge fails during the compilation steps Expected Results: portage should notify the user that either the gtk of motif use flag is required when using dbus.
Created attachment 176682 [details, diff] A patch to both the pcb-20080202.ebuild and pcb-20081128.ebuild I've attached a patch for both the ebuild that should add the proper use flag checking to the pcb ebuilds. I've tested this patch on my system for both the pcb ebuilds and everything performs as expected.
Thanks for the patch, assigning to maintainers.
Normally it is better _not_ to die in such a situation, but choose a reasonable default (probably "gtk", as it is already favoured if both flags are set). Citing from the Ebuild HOWTO, <http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&chap=1>: "Occasionally, ebuilds will have conflicting optional features. Checking for these conflicts and returning an error is not a viable solution. Instead, you must favor one of the features over the others. As to which, consult upstream (what they use as typical default), or consider which option provides more common functionality, or just flip a coin."
Is that applicable in this case though? It makes sense to assume a default when they're both enabled, but if the user has specifically disabled GTK and motif because they don't want to install those libraries, then if we just pick a default we'll end up installing a library that the user specifically requested not to be installed. It would also look pretty confusing if the user trys to emerge pcb, and suddenly portage is installing GTK aswell even though the gtk use flag is disabled. I wouldn't consider these to be conflicting features when they're both disabled.
I have fixed this in pcb-20081128-r1 in a way that I hope will satisfy everybody. Denis.