Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 307949 - Allow specifying an custom output format for equery list
Summary: Allow specifying an custom output format for equery list
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 237964
  Show dependency tree
 
Reported: 2010-03-05 22:58 UTC by Andy Kittner
Modified: 2010-11-22 20:53 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Custom output format for equery list, against svn r749 (gentoolkit-format.patch,6.37 KB, patch)
2010-03-05 22:58 UTC, Andy Kittner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Kittner 2010-03-05 22:58:02 UTC
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.
Comment 1 Andy Kittner 2010-03-05 22:58:46 UTC
Created attachment 222223 [details, diff]
Custom output format for equery list, against svn r749
Comment 2 Douglas Anderson 2010-03-06 03:13:14 UTC
$ 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).
Comment 3 Christian Ruppert (idl0r) gentoo-dev 2010-04-06 09:55:34 UTC
This bug has been fixed in app-portage/gentoolkit-0.3.0_rc10, thanks for reporting this issue.
Comment 4 Paul Varner (RETIRED) gentoo-dev 2010-04-08 15:18:50 UTC
Reopening, since this option is not documented in the equery man page.
Comment 5 Paul Varner (RETIRED) gentoo-dev 2010-11-22 20:53:17 UTC
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.