Gentoo Wiki


This article is part of the Tips & Tricks series.
Terminals / Shells Network X Window System Portage System Filesystems Kernel Other



revdep-rebuild is a nice script that is part of the app-portage/gentoolkit package. It was written to rebuild reverse dependencies on a Gentoo system that may have been broken due to unmerging or upgrading packages. While it is useful, it does have some bugs.


Binary packages

One annoying problem is that revdep-rebuild always wants to rebuild binary packages such as app-office/openoffice-bin. Here is the fix.

Solution #1

Add /usr/lib/openoffice (or /usr/lib32/openoffice for x86_64) to SEARCH_DIRS_MASK in /etc/make.conf (For other binary packages under /opt, also add /opt to SEARCH_DIRS_MASK). This only applies to gentoolkit-0.2.1 or newer.

Solution #2 (obsolete)

Note: I do not know all the repercussions of editing this script. Use at your own risk. (However, I do not think there will be any major problems.)

Edit /usr/bin/revdep-rebuild. Search for the variable SEARCH_DIRS and remove the /opt path.

That's it. Save the file and exit out. Now, OpenOffice (and any other binary package that installs to /opt) will not show up when you run revdep-rebuild.

Dont forget to:

rm /root/.revdep-rebuild*.?_*
Note: If you're sick at the idea of editing revdep-build shell script, you might edit ~/.revdep-rebuild.5_order and remove whatever you want.

See Also

Gentoolkit Guide

The latest revdep-rebuild allows the use of SEARCH_DIRS_MASK in /etc/make.conf.

Retrieved from ""

Last modified: Wed, 26 Dec 2007 15:10:00 +0000 Hits: 27,885