Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 469444

Summary: app-portage/gentoolkit-0.3.0.7: equery --early-out with multiple search items: return one result per item, not a single result (for all items)
Product: Portage Development Reporter: Roman Žilka <roman.zilka>
Component: ToolsAssignee: Portage Tools Team <tools-portage>
Status: CONFIRMED ---    
Severity: enhancement CC: esigra
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 346443    

Description Roman Žilka 2013-05-11 12:58:44 UTC
$ 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
Comment 1 Roman Žilka 2013-05-11 13:03:34 UTC
If the current behavior is intended, there could be a new switch to make --early-out behave the way I'm proposing.
Comment 2 Paul Varner (RETIRED) gentoo-dev 2013-05-14 19:51:13 UTC
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.