When issuing for example "equery -c x11-terms /usr/bin/xterm", it in fact searches contents of all packages even from other categories and filters the output AFTER that. Attached patch solves this. It makes these queries cca 50-80 % faster.
Created attachment 142858 [details, diff] patch against equery 0.1.4
Was that supposed to be "equery belongs -c x11-terms /usr/bin/xterm"?
> Was that supposed to be "equery belongs -c x11-terms /usr/bin/xterm"? Yes, sorry for typo.
Category filtering has never been enabled for belongs, and in 0.3.0, the option was removed entirely. The reason being, under what circumstance will someone know what /category/ a file comes from without having a pretty good idea of what package it came from? Considering a full 'belongs' search takes little over 3 seconds on my laptop, I imagine taking a stab at the category once or twice will actually take longer.... a lot longer. And in the case that you're pretty sure you know the category but can't quite remember a certain package name, "equery list 'some-cat/*'" should help jog your memory. $ time equery b -e /usr/bin/gnome-terminal * Searching for /usr/bin/gnome-terminal ... x11-terms/gnome-terminal-2.26.3.1-r2 (/usr/bin/gnome-terminal) real 0m3.253s user 0m2.828s sys 0m0.336s