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
Created attachment 58232 [details, diff] equery basedir
Created attachment 58233 [details, diff] equery which --exclude-masked support
Sorry, there's no man page diff. I don't know about the man page format yet. :(
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?
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.
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.
No interest in this feature. Not necessary.