In short: it links to sys-libs/gdbm in two cases: USE="-berkdb gdbm" (right) USE="-berkdb -gdbm" (wrong) More important - i does not throw any message that gdbm will be used when both flags are disabled. I suggest to utilize REQUIRES_USE here, for example: REQUIRED_USE="|| ( berkdb gdbm )" and make gdbm USE-flag default one.
Oh, sorry, REQUIRED_USE syntax should be 'exactly one of' in this case: REQUIRED_USE="^^ ( berkdb gdbm )" Cause man-db could be linked only with one of those libraries. berkdb is not enabled in profiles globally(while gdbm is, in releases/), so defaulting to it properly would be good choice.
i specifically did not utilize REQUIRED_USE. first because the ebuild was EAPI=2, and then later because it's annoying. if you enable berkdb or gdbm, then things work as expected. if you happen to have both or neither enabled, then the ebuild will pick a sane default for you. users most likely don't give two s**ts what happens here.
(In reply to SpanKY from comment #2) > i specifically did not utilize REQUIRED_USE. first because the ebuild was > EAPI=2, and then later because it's annoying. if you enable berkdb or gdbm, > then things work as expected. if you happen to have both or neither > enabled, then the ebuild will pick a sane default for you. users most > likely don't give two s**ts what happens here. Well, problem is, that when both of flags are disabled(or enabled) there can be false assumption made by user that neither of that libs needed. However, if you are still strongly against implementing REQUIRED_USE logic, i think we could deal with simple einfo(ewarn/elog?) message, warning user about which sane default is chosen in corner cases.
(In reply to Sergey Popov from comment #3) i have no problem adding an ewarn in like pkg_setup when it's ambiguous (both enabled or both disabled)
should be all set now in the tree; thanks for the report! Commit message: Add warning when USE flags are ambiguous http://sources.gentoo.org/sys-apps/man-db/man-db-2.6.5.ebuild?r1=1.8&r2=1.9