$ equery d virtual/xft [ Searching for packages depending on virtual/xft... ] net-libs/gecko-sdk-1.7.13 x11-libs/fltk-1.1.7 x11-libs/pango-1.10.3 x11-libs/cairo-1.0.4 x11-libs/vte-0.12.2 app-office/abiword-2.2.11 $ emerge -tD =x11-libs/cairo-1.0.4 >>> --tree implies --pretend... adding --pretend to options. These are the packages that would be merged, in reverse order: Calculating dependencies... done! [ebuild R ] x11-libs/cairo-1.0.4 $ emerge -s virtual/x11 Searching... [ Results for search key : virtual/x11 ] [ Applications found : 0 ] So is thare a virtual/x11? Which one? Or why is it not merged if there is none?
(In reply to comment #0) > $ emerge -s virtual/x11 > Searching... > [ Results for search key : virtual/x11 ] > [ Applications found : 0 ] > > So is thare a virtual/x11? Which one? Or why is it not merged if there is none? Well, this search is wrong, and fails equally for any virtual or non-virtual package. # emerge -s net-www/apache Searching... [ Results for search key : net-www/apache ] [ Applications found : 0 ] # emerge -s x11 | grep virtual * virtual/x11 That said, virtual/* is never meant to be emerged directly and there's not much sense in searching for them. There are tons of better alternatives to the slow portage search, like esearch: # esearch -F virtual/x11 [ Results for search key : virtual/x11 ] [ Applications found : 1 ] * virtual/x11 Latest version available: 7.0-r2 Latest version installed: [ Not Installed ] Size of downloaded files: [no/bad digest] Homepage: http://www.gentoo.org/proj/en/desktop/x/x11/ Description: Virtual for the core X11 implementation License: GPL-2 or eix, or whatever...
Also, you can only search for the 'new style' virtuals, the old ones are not ebuilds, so there's nothing to search for. Anyway, forgot to close this, not a bug.
oh, it is said to be a regular expression but it cannot match '/'. Weird.
It can match /, it just looks at the package name only by default (without the category). To include the category you can prefix the search string with @, e.g. emerge -s @virtual/.* I'll agree that this is not the most intuitive way to handle it.
Not ony unintuitive but also undocumented. At least I cannot find anything about that in the emerge man page.
the documentation issue is fixed starting from rev 3605: Index: emerge.1 =================================================================== --- emerge.1 (revision 3593) +++ emerge.1 (working copy) @@ -153,11 +153,13 @@ .BR "\-\-search " (\fB\-s\fR) Searches for matches of the supplied string in the portage tree. The \-\-search string is a regular expression. For example, \fBemerge -\-\-search "^kde"\fR searches for any package that starts with "kde"; +\-\-search "^kde"\fR searches for any package whose name starts with "kde"; \fBemerge \-\-search "gcc$"\fR searches for any package that ends with "gcc"; \fBemerge \-\-search "office"\fR searches for any package that -contains the word "office". If you want to search the package -descriptions as well, use the \fB\-\-searchdesc\fR action. +contains the word "office". If you want to include the category into the +search string, prepend an @: \fBemerge --search "@^dev-java.*jdk"\fR. +If you want to search the package descriptions as well, use the +\fB\-\-searchdesc\fR action. .TP .BR "\-\-searchdesc " (\fB\-S\fR) Matches the search string against the description field as well as
This has been released in 2.1.1_pre1-r2.