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

Bug 91757

Summary: Gentoolkit features: equery basedir and equery which --exclude-masked
Product: Portage Development Reporter: ferret <ferret-bgo>
Component: ToolsAssignee: Portage Tools Team <tools-portage>
Status: RESOLVED WONTFIX    
Severity: enhancement CC: tom.gl
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: equery basedir
equery which --exclude-masked support
combined --exclude-masked and --base-directory patch for 'equery which'

Description ferret 2005-05-06 18:54:57 UTC
The first of these is a feature I decided to add since I was constantly finding need for it.  Example usage:

cat `equery basedir coreutils`/metadata.xms
less `equery r x11`/ChangeLog

Also for answering simple questions like is the ebuild for =app-portage/gentoolkit-0.2.1_pre2 in an overlay?

equery r =app-portage/gentoolkit-0.2.1_pre2


The second minor addition is the ability to exclude masked packages in equery which.  I use this for when I quickly want to look at an ebuild before emerging it, because equery which --exclude-masked package should give the same version as emerge --pretend package.  Example usage:

less `equery w -m logger`
emerge -p jdk
Comment 1 ferret 2005-05-06 18:55:33 UTC
Created attachment 58232 [details, diff]
equery basedir
Comment 2 ferret 2005-05-06 18:56:30 UTC
Created attachment 58233 [details, diff]
equery which --exclude-masked support
Comment 3 ferret 2005-05-06 18:57:36 UTC
Sorry, there's no man page diff.  I don't know about the man page format yet. :(
Comment 4 TGL 2005-05-07 00:56:37 UTC
Imho your "basedir" command could be simply an option ("--basedir") for the "which" command. I mean, it has a similar purpose (find location of the best ebuild matching a pkgspec), and only the output differs a bit, no?
Comment 5 ferret 2005-05-07 03:09:19 UTC
Created attachment 58264 [details, diff]
combined --exclude-masked and --base-directory patch for 'equery which'

That seems a reasonable idea, here's a patch combining the two features into
'equery which'.  Either way suits me, really.
Comment 6 ferret 2005-05-07 03:58:35 UTC
Forgot to mention, in that last attachment I completely ignored any issues that
might arise with specifying both -m and -b.  It works, ond if for example all the
packages in the main portage tree are masked but your ebuild in the overlay
isn't masked it correctly returns the overlay base dir.  I really can't think
why anyone would specify both but I decided there was no need to enforce mutual
exclusivity.  Please feel free to suggest an alternative way of handling this.
Comment 7 ferret 2006-05-28 13:06:01 UTC
No interest in this feature.  Not necessary.