$ equery b fsck * Searching for fsck ... sys-apps/openrc-0.11.8 (/etc/init.d/fsck) sys-apps/openrc-0.11.8 (/usr/share/openrc/runlevels/boot/fsck -> /etc/init.d/fsck) sys-apps/openrc-0.11.8 (/etc/conf.d/fsck) sys-apps/util-linux-2.22.2 (/sbin/fsck) $ equery b sh * Searching for sh ... app-shells/bash-completion-1.3-r2 (/usr/share/bash-completion/sh) dev-libs/klibc-1.5.20 (/usr/lib64/klibc/include/arch/sh) sys-apps/openrc-0.11.8 (/lib64/rc/sh) sys-kernel/hardened-sources-3.8.6 (/usr/src/linux-3.8.6-hardened/drivers/dma/sh) sys-kernel/hardened-sources-3.8.6 (/usr/src/linux-3.8.6-hardened/sound/sh) sys-kernel/hardened-sources-3.8.6 (/usr/src/linux-3.8.6-hardened/sound/soc/sh) sys-kernel/hardened-sources-3.8.6 (/usr/src/linux-3.8.6-hardened/Documentation/sh) sys-kernel/hardened-sources-3.8.6 (/usr/src/linux-3.8.6-hardened/arch/sh) sys-kernel/hardened-sources-3.8.6 (/usr/src/linux-3.8.6-hardened/tools/perf/arch/sh) sys-kernel/hardened-sources-3.8.6 (/usr/src/linux-3.8.6-hardened/drivers/sh) $ equery b -e fsck sh * Searching for fsck,sh ... app-shells/bash-completion-1.3-r2 (/usr/share/bash-completion/sh) I think the last cmd should return two packages: one for fsck, one for sh. Reproducible: Always
If the current behavior is intended, there could be a new switch to make --early-out behave the way I'm proposing.
This is working as designed since the man page states "Stop when the first match is found. This is generally a safe optimization when searching for the owner of a single file." However, I think it does make sense to make it work as you are proposing.