How to find in which overlay is desired package?

I was just looking for the very same thing. If you use eix, you are in luck.

From the wiki:

Adding overlays to the cache

To search not only in the portage tree but all the overlays, add overlays to the cache

root # eix-remote update

and then sync it all:

root # eix-sync

(example from my system)

 $ eix nuvola
* x11-themes/nuvola
  Available versions:  1.0-r1^bs
  Homepage:            http://www.kde-look.org/content/show.php?content=5358
  Description:         Nuvola SVG icon theme

Hmm that doesn't look like a google music player ... time to add some more sources:

 $ eix-remote update
<snip>
Saving to: 'eix-cache.tbz2'
* Unpacking data
layman/Armageddon -> Armageddon
layman/AstroFloyd -> AstroFloyd
 layman/AzP -> AzP
<snip>

looks like about 500 sources :)

root # eix-sync -q

Now when searching, if you wish to expand your search, add -R (remote) to search all overlays, installed or not. You will want to sync it with eix-remote from time to time. See man eix.

 $ eix -R nuvola
* media-sound/nuvolaplayer
 Available versions:  (~)2.0.1[2] (~)2.0.3[1] {debug}
 Homepage:            https://launchpad.net/nuvola-player
 Description:         Cloud music integration for your Linux desktop

* x11-themes/nuvola
 Available versions:  1.0-r1^bs
 Homepage:            http://www.kde-look.org/content/show.php?content=5358
 Description:         Nuvola SVG icon theme

[1] "sabayon" layman/sabayon
[2] "tante" layman/tante

I don't think there is an automated system to search through overlayes by specific package name. what you can do is:

  • run layman -L to see the available overlays and guess based on their names if they have the package you are looking for.
  • search here: http://gpo.zugaina.org/
  • google for 'gentoo package_name'