From: Michael Haubenwallner <haubi@gentoo.org>
To: fx.carton@yahoo.fr
Cc: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Re: Building packages in different prefix without rebuilding system packages
Date: Fri, 15 May 2020 12:53:16 +0200 [thread overview]
Message-ID: <2233d614-f301-69fa-ef69-48febf7439d6@gentoo.org> (raw)
In-Reply-To: <20200514050205.GA15477@pc-fx>
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/
next prev parent reply other threads:[~2020-05-15 10:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[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-14 5:13 ` Dale
2020-05-14 8:07 ` Michael
2020-05-14 8:37 ` François-Xavier Carton
2020-05-14 8:46 ` Pengcheng Xu
2020-05-14 10:07 ` Neil Bothwick
2020-05-14 10:17 ` Pengcheng Xu
2020-05-14 11:55 ` Neil Bothwick
2020-05-14 13:09 ` Pengcheng Xu
2020-05-14 13:26 ` Michael Orlitzky
2020-05-14 22:32 ` François-Xavier Carton
2020-05-15 10:53 ` Michael Haubenwallner [this message]
2020-05-15 21:44 ` [gentoo-user] " François-Xavier Carton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2233d614-f301-69fa-ef69-48febf7439d6@gentoo.org \
--to=haubi@gentoo.org \
--cc=fx.carton@yahoo.fr \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox