Gentoo Archives: gentoo-user

From: Pengcheng Xu <i@××××××××.moe>
To: gentoo-user@l.g.o
Subject: RE: [gentoo-user] Building packages in different prefix without rebuilding system packages
Date: Thu, 14 May 2020 08:47:11
Message-Id: 02e101d629cc$3c3c4ba0$b4b4e2e0$@jsteward.moe
In Reply to: Re: [gentoo-user] Building packages in different prefix without rebuilding system packages by Dale
1 François-Xavier's first email didn't make its way to my inbox, so I'm replying to this one instead. EPREFIX is specifically designed for the Gentoo Prefix project [1]. In a word, Portage installs _everything_ inside the prefix, and uses nothing except the kernel (and some user files under home) outside the prefix. It is widely used in supercomputing and corporate infrastructure where the user does not have escalated permissions and the existing packages are too old or missing (CentOS 5) for whatever the user is trying to do.
2
3 What you're trying to achieve sounded a lot like `./configure --prefix=...` to me. If you're just dealing a small amount of things, I would suggest modifying the ebuild (in a local overlay) and changes where the program installs to. That means no special handling on Portage's side, just the app's installed to somewhere else rather than the default prefix (in most cases '/usr').
4
5 [1]: https://wiki.gentoo.org/wiki/Project:Prefix
6
7 Regards,
8 --
9 Pengcheng Xu
10 https://jsteward.moe
11
12 > -----Original Message-----
13 > From: Dale <rdalek1967@×××××.com>
14 > Sent: Thursday, May 14, 2020 1:14 PM
15 > To: gentoo-user@l.g.o
16 > Subject: Re: [gentoo-user] Building packages in different prefix without
17 > rebuilding system packages
18 >
19 > François-Xavier Carton wrote:
20 >
21 >
22 > Hi,
23 >
24 > Is there a way of installing packages in a different prefix while still
25 > using system packages? I've tried setting EPREFIX, however doing that
26 > will install all dependencies in the prefix, even if there are already
27 > installed in the system.
28 >
29 > I was hoping to install some packages in user directories, but I also
30 > don't want to duplicate the packages installed globally. For example,
31 > most packages eventually depend on gcc, which I definitely don't want
32 > to
33 > compile twice. So ideally, only dependencies that are not installed
34 > globally should be pulled in.
35 >
36 > I was not able to find a way of doing that, but I feel like it shouldn't
37 > be too hard, because EPREFIX almost does what I want. Does someone know
38 > if it's possible without too much tweaking?
39 >
40 > Thanks,
41 > -François-Xavier
42 >
43 >
44 >
45 > I'm clueless on EPREFIX but if you want to avoid compiling a package twice,
46 > would the -k option help? If you have portage set to save the binaries you
47 > compiled before, it would install from that instead of compiling things twice.
48 >
49 > Just thought I'd mention just in case it would help.
50 >
51 > Dale
52 >
53 > :-) :-)

Attachments

File name MIME type
openpgp-digital-signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Building packages in different prefix without rebuilding system packages Neil Bothwick <neil@××××××××××.uk>