On Thu, May 14, 2020 at 09:26:10AM -0400, Michael Orlitzky wrote: > On 5/14/20 7:55 AM, Neil Bothwick wrote: > > On Thu, 14 May 2020 18:17:06 +0800, Pengcheng Xu wrote: > > > >> That seems interesting. Do we need to include Portage install prefix > >> (/var/tmp/portage/category/package/..., the image path prefix before > >> actually merging with /)? > >> > >> Regards, > > > > No, just the --prefix=/home/blah/ that you want added to the ./configure > > invocation. > > > > This is a good way to install packages that you've built by hand into > (say) your home directory, but it will cause problems if you try to > trick portage into doing it. The big problem is that no other packages > are going to know where to find the thing you just installed. Everything > else in the Gentoo repository is designed to use standard values of > PATH, LD_LIBRARY_PATH, the compiler's include dir, PKG_CONFIG_PATH, etc. > If you take one program and put it somewhere non-standard, then every > package depending on it is going to break. > > If you install an *additional* copy (built by hand) in your home > directory, that's fine -- the system copy will still be in the right > place -- you just don't want to hide the system copy where nobody can > find it. >
In my case, this wouldn't be a problem: I don't want the packages to be accessed by anyone, just one user. I can set PATH, LD_LIBRARY_PATH, PKG_CONFIG_PATH and MANPATH for that user. I already do that for things I build manually anyway. EXTRA_ECONF is nice, I didn't know about it. It looks like MYCMAKEARGS can be used for cmake ebuilds. For other build systems, it might be necessary to edit the ebuild, or set different variables. I still kinda think that being able to install with a prefix (like EPREFIX) but using the base system would be a nice feature. As discussed previously, there would be the problem of updates; but it isn't very different from installing software manually. If I clone something and build it locally, a world update might break break it, and portage cannot rebuild it automatically since it's not aware of it. This is why I think it would be nice if portage supported it; that way, after an update of the base system, updating the prefix system would solve the problems. It's probably difficult to implement that in portage, though.