It would be nice if portage had a way for ebuilds to specify that a dependent package needs to be merged with a certain combination of USE flags set/unset. Maybe something like this in foo.ebuild:
(I'm just using this syntax as an example and not necessarily trying to show that it is a good idea; I'm just trying to explain how this feature should work.)
The idea is that at dependency resolution time, we should be able to remerge dependent packages if they need a different set of USE flags than are currently set in make.conf or than those which are currently compiled in. In this example, we should see that if baz is not installed and the 'bar' USE flag has not been explicitly set, emerging foo should compile baz with USE=bar set. If baz is already installed with USE=-bar, emerging foo should first recompile baz with USE=bar. If USE=-baz has explicitly been set in make.conf (or package.use, or ...), we should generate a blocker situation and refuse to merge anything. The reverse of the above should also be true if foo depended on sys-apps/baz with USE=-bar.
This feature would solve many USE-dependency nightmares. Try emerging horde-chora on a system that doesn't have php installed and has a minimal set of USE flags, and you find that many of the PEAR packages chora depends on require various USE flags to be set on dev-lang/php. Every time one PEAR module merges, the next requires yet another set of USE flags to be enabled and php remerged (!), resulting in USE-flag Dependency Hell(tm).
Chora is not the only example of this in portage, but it is the one that got me thinking about this idea (so please don't just say that this particular set of ebuilds is broken). This feature would be a *really* nice thing to have.
*** This bug has been marked as a duplicate of 2272 ***