public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* [gentoo-user] Re: Building packages in different prefix without rebuilding system packages
  @ 2020-05-15 10:53 99%   ` Michael Haubenwallner
  0 siblings, 0 replies; 1+ results
From: Michael Haubenwallner @ 2020-05-15 10:53 UTC (permalink / raw
  To: fx.carton; +Cc: gentoo-user

Hi François-Xavier,

On 5/14/20 7:02 AM, François-Xavier Carton wrote:
> Hi,
> 
> Is there a way of installing packages in a different prefix while still
> using system packages? I've tried setting EPREFIX, however doing that
> will install all dependencies in the prefix, even if there are already
> installed in the system.
> 
> I was hoping to install some packages in user directories, but I also
> don't want to duplicate the packages installed globally. For example,
> most packages eventually depend on gcc, which I definitely don't want to
> compile twice. So ideally, only dependencies that are not installed
> globally should be pulled in.
> 
> I was not able to find a way of doing that, but I feel like it shouldn't
> be too hard, because EPREFIX almost does what I want. Does someone know
> if it's possible without too much tweaking?

What you're after is known as "Prefix/Stack", where you have some "base"
Prefix, which's portage does manage packages in another - stacked - Prefix.

While this does work already with "Prefix/Guest" as base Prefix, there is no
technical reason to not work with "Prefix/Standalone" or even "Gentoo Linux"
as the base Prefix.  The only problem maybe is that "Prefix/Guest" does use
a portage version with additional patches.

But still, you can get an idea about how this works, using "Prefix/Guest":

 $ docker run -t -i gentooprefix/prefix-guest-64bit-fedora -c /bin/bash

At the docker prompt:

Enter the Guest Prefix preinstalled to /tmp/gentoo:
 $ /tmp/gentoo/startprefix

Set up your stacked Prefix:
 $ prefix-stack-setup --eprefix=$HOME/stack --profile=/tmp/gentoo/etc/portage/make.profile
Note that "~/stack" will not work here, bash refuses to resolve '~' after '='.

Leave the Guest Prefix:
 $ exit

Enter your just created stacked Prefix:
 $ ~/stack/startprefix

Emerge your package, for example:
 $ emerge sys-libs/zlib

Have fun!

HTH,
/haubi/


^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
     [not found]     <20200514050205.GA15477.ref@pc-fx>
2020-05-14  5:02     ` [gentoo-user] Building packages in different prefix without rebuilding system packages François-Xavier Carton
2020-05-15 10:53 99%   ` [gentoo-user] " Michael Haubenwallner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox