Gentoo Archives: gentoo-dev

From: William Hubbs <williamh@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] rfc: usrmerge script
Date: Sun, 21 Mar 2021 19:22:22
Message-Id: YFec53SSS9+KmRI6@linux1.home
In Reply to: Re: [gentoo-dev] rfc: usrmerge script by Matthias Maier
1 On Sun, Mar 21, 2021 at 01:00:01PM -0500, Matthias Maier wrote:
2 > Hi William,
3 >
4 > I have migrated my system to a merged /usr a while ago.
5 >
6 > In addition to moving everything to /usr and setting up symlinks, the
7 > main thing I had to do was to set up a /etc/portage/bashrc hook for
8 > post_src_install() that would move everything into /usr.
9 >
10 > Do we have native support in portage for this now?
11
12 From what I know, you don't need that hook. The ebuilds handle this now
13 by using the split-usr use flag, so if you add this to
14 /etc/portage/make.conf you should be ok.
15
16 USE="${USE} -split-usr"
17
18 Let me know if that isn't the case.
19
20 I'm not exactly sure what portage will do without your hook though. What
21 happens if you remove your hook then some ebuild tries to install
22 something in /bin for example? I would argue that, if /bin resolves to a
23 path, portage should just follow the symlink and install where the
24 symlink points. I base this argument on the return of `test -d` for
25 this situation.
26
27 ```
28 $ ln -s /usr/bin foo
29 $ [ -d foo ] && echo "foo is a path"
30 ```
31
32 Thanks,
33
34 William

Attachments

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