Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 244599 - Prefixed revdep-rebuild refers to /etc/init.d/functions.sh
Summary: Prefixed revdep-rebuild refers to /etc/init.d/functions.sh
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo non-Linux Team
URL:
Whiteboard:
Keywords:
: 250612 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-10-27 08:45 UTC by Rabbe Fogelholm
Modified: 2008-12-14 09:49 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rabbe Fogelholm 2008-10-27 08:45:17 UTC
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.
Comment 1 Rabbe Fogelholm 2008-10-27 08:52:43 UTC
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.
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-10-27 13:58:56 UTC
ugh, there are indeed, many, references to /etc =/
Comment 3 Ceesjan Luiten 2008-11-04 10:55:33 UTC
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
Comment 4 Fabian Groffen gentoo-dev 2008-11-04 11:25:57 UTC
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.
Comment 5 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-12-11 13:52:12 UTC
*** Bug 250612 has been marked as a duplicate of this bug. ***
Comment 6 michael@smith-li.com 2008-12-13 15:31:58 UTC
(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?
Comment 7 Fabian Groffen gentoo-dev 2008-12-14 09:49:35 UTC
It does AIX support right now, while preserved-libs doesn't know (yet) how to do it for AIX.