Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:prefix commit in: lib/portage/package/ebuild/
Date: Fri, 14 Jan 2022 12:22:39
Message-Id: 1642162915.1cfed563898a8861a20da6ed0a0c1e75f72aaeaa.grobian@gentoo
1 commit: 1cfed563898a8861a20da6ed0a0c1e75f72aaeaa
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jan 14 12:21:55 2022 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 14 12:21:55 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=1cfed563
7
8 lib/portage/package/ebuild/config: restore operation on Prefix
9
10 auto-enable unprivileged mode when Prefix is detected
11
12 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
13
14 lib/portage/package/ebuild/config.py | 3 ++-
15 1 file changed, 2 insertions(+), 1 deletion(-)
16
17 diff --git a/lib/portage/package/ebuild/config.py b/lib/portage/package/ebuild/config.py
18 index e786bd930..d8278ff10 100644
19 --- a/lib/portage/package/ebuild/config.py
20 +++ b/lib/portage/package/ebuild/config.py
21 @@ -1115,7 +1115,8 @@ class config:
22 }
23
24 eroot_or_parent = first_existing(eroot)
25 - unprivileged = False
26 + # PREFIX LOCAL
27 + unprivileged = portage.const.EPREFIX != ''
28 try:
29 # PREFIX LOCAL: inventing UID/GID based on a path is a very
30 # bad idea, it breaks almost everything since group ids