The prefixed revdep-rebuild refers to /etc/init.d/functions.sh, which does not exist. This problem was noticed in app-portage/gentoolkit-0.2.4.1-r00.1.
I tentatively fixed the problem by inserting the $EPREFIX path to functions.sh; I then noticed that there are more references to /etc that probably should be changed to $EPREFIX/etc.
ugh, there are indeed, many, references to /etc =/
I added the EPREFIX thing with the following sed prog: sed -i '/etc/{s/\([ "]\)\/etc/\1$EPREFIX\/etc/g}' ~/gentoo/usr/bin/revdep-rebuild Note that the [] contains a space, a tab and a ". Looking at the file I wonder if spaces in $EPREFIX will cause trouble. When running revdep-rebuild I get the following error: quinox@iMacje ~/gentoo/usr/local/portage/macje $ revdep-rebuild * You are not superuser. Adding --pretend to emerge options. * Configuring search environment for revdep-rebuild * Working directory expected to be /var/folders/oe/oeQc0-VhFpmmzClb9Q7TdU+++TQ/-Tmp-/revdep-rebuild.c5JEt9urQb, but it is /private/var/folders/oe/oeQc0-VhFpmmzClb9Q7TdU+++TQ/-Tmp-/revdep-rebuild.c5JEt9urQb quinox@iMacje ~/gentoo/usr/local/portage/macje $ There are two problems here, first of not being root shouldn't be a problem since Prefix is entirely owned by my own user . The the second one being that /var/ is symlinked to /private/var on my MacOSX, causing the cd function to fail on the safety check. The latter I worked around by changing the "die 1 foobar" into "einfo foobar" inside the cd() function at line 471
Let me explain why this is a low priority thing. revdep-rebuild is not designed for Prefix, and in particularly not for non-ELF systems. Also, the Portage we use has preserve-libs feature, which does a great job in most cases of eliminating the need for revdep-rebuild, and as a bonus keep your system working at the moment an upgrade breaks existing packages. We should try to avoid using revdep-rebuild in Prefix, and rely on the Portage tools for it instead, which know how to deal with Prefix and non-ELF systems.
*** Bug 250612 has been marked as a duplicate of this bug. ***
(In reply to comment #4) > revdep-rebuild is not designed for Prefix, and in particularly not for non-ELF > systems. Indeed, and hopefully we can get a chance to rewrite gentoolkit in a modular way so that arch-inappropriate packages can be USE masked for those arches. There is a somewhat slow-moving plan to do that. I believe the gains from fixing this particular bug are unfortunately not worth the effort. Is there something PREFIXed systems get from r-r that they can't get from @preserved-rebuild?
It does AIX support right now, while preserved-libs doesn't know (yet) how to do it for AIX.