The do_lookup function in helpers2 was not including masked packages for simple (string or atom) lookups. pre-patch: dja@vault ~ $ equery l -p dvbcut * Searching for dvbcut ... * Portage tree (/usr/portage): post-patch: dja@vault ~ $ equery l -p dvbcut * Searching for dvbcut ... * Portage tree (/usr/portage): [-P-] [M~] media-video/dvbcut-0.5.4-r1 (0)
Created attachment 190802 [details, diff] Include masked packages in helpers2._do_simple_lookup
I think it is more than that. I did some observations and found the following out: Output of eix for the tested packages: > eix -I cut > [I] media-video/dvbcut > Available versions: (~)0.5.4-r1 (~)0.6.0[1] **9999[1] > Installed versions: 0.6.0[1](15:09:37 09.05.2009) > > [I] media-video/ttcut > Available versions: 0.19.6-r1 0.19.6-r1[1] **9999 **9999[1] > Installed versions: 0.19.6-r1[1](09:07:44 21.03.2009) > > [1] "gentoo-billie" /media/system/repositories/portage-billie So I expect "equery l" to give me three results for dvbcut one from the portage tree and two from my overlay. Same for ttcut two results for the portage tree and two results for my overlay. This is what I get unpatched: > equery l -p ttcut > * Searching for ttcut ... > * Portage tree (/media/system/repositories/portage): > > equery l -p dvbcut > * Searching for dvbcut ... > * Portage tree (/media/system/repositories/portage): > [-P-] [ ~] media-video/dvbcut-0.5.4-r1 (0) Nothing changed with the patch applied: > equery l -p ttcut > * Searching for ttcut ... > * Portage tree (/media/system/repositories/portage): > > equery l -p dvbcut > * Searching for dvbcut ... > * Portage tree (/media/system/repositories/portage): > [-P-] [ ~] media-video/dvbcut-0.5.4-r1 (0) If I temporarily rename the packages in my overlay I expect equery to give me at least the results for the portage tree. One result for dvbcut and two results for ttcut. mv dvbcut/ dvbcu && mv ttcut ttcu But I get unpatched: > equery l -p ttcut > * Searching for ttcut ... > * Portage tree (/media/system/repositories/portage): > > equery l -p dvbcut > * Searching for dvbcut ... > * Portage tree (/media/system/repositories/portage): > [-P-] [ ~] media-video/dvbcut-0.5.4-r1 (0) And patched: > equery l -p ttcut > * Searching for ttcut ... > * Portage tree (/media/system/repositories/portage): > [-P-] [M ] media-video/ttcut-9999 (0) > > equery l -p dvbcut > * Searching for dvbcut ... > * Portage tree (/media/system/repositories/portage): > [-P-] [ ~] media-video/dvbcut-0.5.4-r1 (0) So even with no overlays the output for ttcut is wrong as it only shows the masked version. If overlays come into play equery is even more confused especially if there are packages with the same version also in the portage tree.
The patched output looks correct to me. There have been a few slight changes in the way equery list handles the options. I regret that changes aren't reflected in the man page yet. There's a bug open for that (bug 269071). When you search with no options, it defaults to searching for installed files: $ equery l gentoolkit * Searching for gentoolkit ... * installed packages: [I--] [ ~] app-portage/gentoolkit-0.3.0_rc5 (0) Then, if you specify a search location (either -p or -o, it will ONLY search where you're asking it to... equivalent to gentoolkit-0.2*'s equery list -pI something). $ equery l -p gentoolkit * Searching for gentoolkit ... * Portage tree (/usr/portage): [-P-] [M ] app-portage/gentoolkit-0.2.4_pre8 (0) [-P-] [ ] app-portage/gentoolkit-0.2.4.2-r1 (0) [-P-] [ ~] app-portage/gentoolkit-0.2.4.3 (0) Notice it didn't list the installed version. This definition of "portage tree" is consistent with older versions of equery, where it means the set of packages in the portage tree minus the VDB. I think that's a bit confusing, but that's historically what "portage tree" is in equery. The only difference is that it now only gives you what you ask for. To include installed with it, you have to add the -i option: $ equery l -pi gentoolkit * Searching for gentoolkit ... * installed packages: [I--] [ ~] app-portage/gentoolkit-0.3.0_rc5 (0) * Portage tree (/usr/portage): [-P-] [M ] app-portage/gentoolkit-0.2.4_pre8 (0) [-P-] [ ] app-portage/gentoolkit-0.2.4.2-r1 (0) [-P-] [ ~] app-portage/gentoolkit-0.2.4.3 (0) And lastly, to include versions in an overlay, use the -o option. This is also consistent with older version of equery: $ equery l -pio gentoolkit * Searching for gentoolkit ... * installed packages: [I--] [ ~] app-portage/gentoolkit-0.3.0_rc5 (0) * Portage tree (/usr/portage): [-P-] [M ] app-portage/gentoolkit-0.2.4_pre8 (0) [-P-] [ ] app-portage/gentoolkit-0.2.4.2-r1 (0) [-P-] [ ~] app-portage/gentoolkit-0.2.4.3 (0) * overlay tree (/usr/local/portage/layman/genscripts /usr/local/portage/layman/sunrise /usr/local/portage/layman/xwing /usr/local/portage): [--O] [ ~] app-portage/gentoolkit-0.2.5_rc10 (0) [--O] [ ~] app-portage/gentoolkit-0.3.0_rc2 (0) [--O] [ ~] app-portage/gentoolkit-0.3.0_rc4 (0)
Thinking about this more, I think it would actually be better to get rid of -i altogether and make only have -I, and not even have an "* installed packages" heading, because being installed doesn't exclude a package from being in overlay or porttree, as equery has traditionally handled it. It would be a lot more intuitive if the output were something like: $ equery l -po gentoolkit * Searching for gentoolkit ... * Portage tree (/usr/portage): [-P-] [M ] app-portage/gentoolkit-0.2.4_pre8 (0) [-P-] [ ] app-portage/gentoolkit-0.2.4.2-r1 (0) [-P-] [ ~] app-portage/gentoolkit-0.2.4.3 (0) [IP-] [ ~] app-portage/gentoolkit-0.3.0_rc5 (0) * overlay tree (...): [--O] [ ~] app-portage/gentoolkit-0.2.5_rc10 (0) [--O] [ ~] app-portage/gentoolkit-0.3.0_rc2 (0) [--O] [ ~] app-portage/gentoolkit-0.3.0_rc4 (0) With the installed indicator marked alongside P or O. That would take some work, but I think it makes a lot more sense.
Thank you for your explanations. I should have read the output of --help more carefully :-) I think getting rid of the -i option is a good idea and just indicate the installed package in the output like you mentioned above.
(In reply to comment #5) > Thank you for your explanations. I should have read the output of --help more > carefully :-) > > I think getting rid of the -i option is a good idea and just indicate the > installed package in the output like you mentioned above. > Current svn version uses this idea, output is a lot more compact and readable. Also try `equery --quiet list` in svn for an even more compact output (and it can speed things up in certain situations). These improvements will be available in gentoolkit-0.3.0_rc7.
Released in gentoolkit-0.3.0_rc7