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

Bug 273466

Summary: gentoolkit-0.3.0 svn: -c, --category filtering replaced with globbing
Product: Portage Development Reporter: Douglas Anderson <douglasjanderson>
Component: Third-Party ToolsAssignee: Portage Tools Team <tools-portage>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 269071    

Description Douglas Anderson 2009-06-10 03:01:45 UTC
I'm adding bugs for non-trivial changes to equery now that we've got a few release candidates out the door just to have a place for people to discuss it if they don't agree with my changes.

This bug is to explain changes to category filtering in a recent commit to my local svn, http://genscripts.googlecode.com/svn.

As of gentoolkit-0.3.0_rc6, three modules: check, list and size still had a local option, -c, --category, which allowed those three modules to pre-filter a smaller list before searching for the package-ver, which could really speed up package searches and allow users to do things like listing all category. There are a few issues:

* only 3 modules have it
* it takes more typing and so is probably underused.
* with the latest equery, which allows multiple package input, you run into a problem like:

# Check all installed packages in category dev-python and python itself:
$ equery k -c dev-python '*' dev-lang/python
[ Checking dev-python/PyQt4-4.4.4-r2 ]
 * 435 out of 435 files passed
[snip]
[ Checking dev-python/wxpython-2.6.4.0-r2 ]
 * 757 out of 757 files passed

!!! No package found matching dev-lang/python

The category filter affected the second package, even though it had its owns category.

Since you literally have to use the new globbing support anyway, there's a better way to do the above: 
$ equery k 'dev-python/*' dev-lang/python
 * Checking dev-python/PyQt4-4.4.4-r2 ...
   435 out of 435 files passed
[snip]
 * Checking dev-python/wxpython-2.6.4.0-r2 ...
   757 out of 757 files passed

 * Checking dev-lang/python-2.6.2-r1 ...
   4024 out of 4024 files passed

Benefits to doing it all with globbing are:
* just as fast as -c, --category
* simpler command syntax, much more flexible
* almost all modules have support for this
* simplifies the code complexity

-c, --category option is removed completed in r13. Objections?
Comment 1 Paul Varner (RETIRED) gentoo-dev 2009-06-16 18:37:59 UTC
No objections, we just need to document it.
Comment 2 Douglas Anderson 2009-10-27 18:25:27 UTC
This change has been documented and uploaded to bug 269071 for a while, so closing.