On occasion I found it quite useful to have a list of package atoms in a certain format (versioned atoms, slotted atoms, just category/package). After typing the n-th throwaway script in /tmp/foo.py I decided to do it properly for once and added support for this to equery. With the attached patch one can do e.g.: $ equery l -F '$cp' 'app-misc/*' # just category/package name $ equery l -F '=$cpv' 'app-misc/*' # version atoms including operator $ equery l -F '$cp:$slot' 'app-misc/*' # slotted atoms As with my other patch I just submitted it's just the code changes, but I'd be willing to work on anything thats missing if the maintainers think that something like this could be included in a future gentoolkit version.
Created attachment 222223 [details, diff] Custom output format for equery list, against svn r749
$ svn ci -m "Adding equery list formatting patch from Andy Kittner; bug #307949." Sending gentoolkit/pym/gentoolkit/equery/list_.py Sending gentoolkit/pym/gentoolkit/package.py Transmitting file data .. Committed revision 249. Nice to actually have some formatting options in PackageFormatter. Will also add this to hasuse (since it uses PackageFormatter as well).
This bug has been fixed in app-portage/gentoolkit-0.3.0_rc10, thanks for reporting this issue.
Reopening, since this option is not documented in the equery man page.
Released in gentoolkit-0.3.0_rc11 This is fixed for 'equery list'. However, we should make the formatting a global option and use it anywhere packages names can be output. See bug 224515.