If you need to search for a string, a function or whatever in the ebuilds from all the repositories, or even from the installed overlay (ebuilds stored in the VDB), use qgrep.
You can even grep in the eclasses with the --eclass switch.
Greping in installed ebuild

sam@truc ~ $ qgrep --installed LIB_DIR --with-name installed::x11-drivers/nvidia-drivers-1.0.8776-r1: local X11_LIB_DIR="/usr/${inslibdir}/xorg" installed::x11-drivers/nvidia-drivers-1.0.8776-r1: X11_LIB_DIR="/usr/${inslibdir}" installed::x11-drivers/nvidia-drivers-1.0.8776-r1: exeinto ${X11_LIB_DIR}/modules/drivers installed::media-libs/mesa-6.5.2-r1: echo "LIB_DIR = $(get_libdir)" >> ${HOSTCONF} installed::media-libs/mesa-6.5.2-r1: echo 'DRI_DRIVER_SEARCH_DIR = /usr/$(LIB_DIR)/dri' >> ${HOSTCONF} installed::media-libs/mesa-6.5.2-r1: DRI_DRIVER_INSTALL_DIR="${D}/usr/\$(LIB_DIR)/dri" \

It can be slow, so restrict the search to one overlay with the --overlay arg option when possible, you can also restrict it with either the category, the package name, the version, or the overlay.
For example:
Special greping...

sam@truc ~ $ # the searched string below is 'bash' sam@truc ~ $ qgrep bash app-portage/::gentoo portage-2.1.2.3 ::paludis-overlay --list paludis-overlay::dev-cpp/libwrapiter/libwrapiter-scm.ebuild paludis-overlay::sys-apps/paludis/paludis-0.22.1.ebuild paludis-overlay::sys-apps/paludis/paludis-0.22.2.ebuild paludis-overlay::sys-apps/paludis/paludis-scm.ebuild gentoo::app-portage/cfg-update/cfg-update-1.7.2.ebuild gentoo::app-portage/cfg-update/cfg-update-1.8.0-r3.ebuild gentoo::app-portage/cfg-update/cfg-update-1.8.0-r6.ebuild gentoo::app-portage/genflags/genflags-0.96.ebuild gentoo::app-portage/genlop/genlop-0.30.5.ebuild gentoo::app-portage/genlop/genlop-0.30.7.ebuild gentoo::app-portage/herdstat/herdstat-1.1.1_p7.ebuild gentoo::app-portage/herdstat/herdstat-1.1.2.ebuild gentoo::app-portage/herdstat/herdstat-1.1.91-r1.ebuild gentoo::app-portage/udept/udept-0.5.96.2.ebuild gentoo::app-portage/udept/udept-0.5.99.0.2.95-r1.ebuild gentoo::app-portage/udept/udept-0.5.99.0.2.95.ebuild gentoo::sys-apps/portage/portage-2.1.2.3.ebuild

When installing something, I don't like to wait without approximately knowing when the whole thing will end, that's why I've played a lot with qlop, so that it now fill my needs. I hope you'll also like it:) :
Estimating how much time a given install would take

sam@truc ~ $ paludis -ip beryl | qlop -pH x11-misc/beryl-settings-bindings : 36 seconds average for 2 merges x11-misc/beryl-settings : 16 seconds average for 3 merges x11-apps/xlsclients : 14 seconds average for 2 merges x11-apps/xvinfo : 14 seconds average for 2 merges x11-misc/beryl-manager : 18 seconds average for 3 merges x11-wm/beryl : 6 seconds average for 3 merges Total estimated time: 1 minute, 44 seconds (6 packages)

And suppose you've already started installing stuffs, but don't know how much time it can last, use --current : (in the following example, I'll set the verosity at "level 2", that way, we also have to estimated time before the whole install ends)
Displaying current install status

sam@truc ~ $ qlop --current -vv * x11-misc/beryl-settings-bindings-0.2.1.ebuild::gentoo started: Fri Apr 13 13:31:37 2007 elapsed: 24 seconds avg build time: 36 seconds * x11-misc/beryl-settings-bindings-0.2.1::gentoo * x11-misc/beryl-settings-0.2.1::gentoo * x11-apps/xlsclients-1.0.1::gentoo * x11-apps/xvinfo-1.0.1::gentoo * x11-misc/beryl-manager-0.2.1::gentoo * x11-wm/beryl-0.2.1::gentoo estimated time left: 1 minute, 19 seconds (6 packages)


View the different patches here If this is still not enough, then you might find me on the gentoo forums: truc or join #paludis-extras on freenode and ask fro samlt