Gentoo Archives: gentoo-portage-dev

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-portage-dev@l.g.o
Cc: "Ulrich Müller" <ulm@g.o>
Subject: [gentoo-portage-dev] [PATCH] Remove obsolete FEATURES=force-prefix
Date: Sun, 22 Jan 2023 08:18:28
Message-Id: 20230122081813.25395-1-ulm@gentoo.org
1 Signed-off-by: Ulrich Müller <ulm@g.o>
2 ---
3 bin/dohtml.py | 6 ++----
4 bin/eapi.sh | 4 ++--
5 lib/portage/const.py | 3 +--
6 lib/portage/package/ebuild/config.py | 11 +++--------
7 man/make.conf.5 | 8 +-------
8 5 files changed, 9 insertions(+), 23 deletions(-)
9
10 diff --git a/bin/dohtml.py b/bin/dohtml.py
11 index 4ebee7779..d1f0e3140 100755
12 --- a/bin/dohtml.py
13 +++ b/bin/dohtml.py
14 @@ -1,5 +1,5 @@
15 #!/usr/bin/env python
16 -# Copyright 1999-2020 Gentoo Authors
17 +# Copyright 1999-2023 Gentoo Authors
18 # Distributed under the terms of the GNU General Public License v2
19
20 #
21 @@ -146,9 +146,7 @@ class OptionsClass:
22 self.PF = os.environ["PF"]
23 if self.PF:
24 self.PF = normalize_path(self.PF)
25 - if "force-prefix" not in os.environ.get(
26 - "FEATURES", ""
27 - ).split() and os.environ.get("EAPI", "0") in ("0", "1", "2"):
28 + if os.environ.get("EAPI", "0") in ("0", "1", "2"):
29 self.ED = os.environ.get("D", "")
30 else:
31 self.ED = os.environ.get("ED", "")
32 diff --git a/bin/eapi.sh b/bin/eapi.sh
33 index d90c3cd2e..ae815f3a6 100644
34 --- a/bin/eapi.sh
35 +++ b/bin/eapi.sh
36 @@ -1,5 +1,5 @@
37 #!/usr/bin/env bash
38 -# Copyright 2012-2022 Gentoo Authors
39 +# Copyright 2012-2023 Gentoo Authors
40 # Distributed under the terms of the GNU General Public License v2
41
42 # PHASES
43 @@ -27,7 +27,7 @@ ___eapi_has_S_WORKDIR_fallback() {
44 # VARIABLES
45
46 ___eapi_has_prefix_variables() {
47 - [[ ! ${1-${EAPI-0}} =~ ^(0|1|2)$ || " ${FEATURES} " == *" force-prefix "* ]]
48 + [[ ! ${1-${EAPI-0}} =~ ^(0|1|2)$ ]]
49 }
50
51 ___eapi_has_BROOT() {
52 diff --git a/lib/portage/const.py b/lib/portage/const.py
53 index a6f7a2242..99206fe2c 100644
54 --- a/lib/portage/const.py
55 +++ b/lib/portage/const.py
56 @@ -1,5 +1,5 @@
57 # portage: Constants
58 -# Copyright 1998-2021 Gentoo Authors
59 +# Copyright 1998-2023 Gentoo Authors
60 # Distributed under the terms of the GNU General Public License v2
61
62 import os
63 @@ -156,7 +156,6 @@ SUPPORTED_FEATURES = frozenset(
64 "fakeroot",
65 "fixlafiles",
66 "force-mirror",
67 - "force-prefix",
68 "getbinpkg",
69 "gpg-keepalive",
70 "icecream",
71 diff --git a/lib/portage/package/ebuild/config.py b/lib/portage/package/ebuild/config.py
72 index 23b524235..f66bf6485 100644
73 --- a/lib/portage/package/ebuild/config.py
74 +++ b/lib/portage/package/ebuild/config.py
75 @@ -1,4 +1,4 @@
76 -# Copyright 2010-2021 Gentoo Authors
77 +# Copyright 2010-2023 Gentoo Authors
78 # Distributed under the terms of the GNU General Public License v2
79
80 __all__ = [
81 @@ -3347,14 +3347,9 @@ class config:
82 if not (src_like_phase and eapi_attrs.broot):
83 mydict.pop("BROOT", None)
84
85 - # Prefix variables are supported beginning with EAPI 3, or when
86 - # force-prefix is in FEATURES, since older EAPIs would otherwise be
87 - # useless with prefix configurations. This brings compatibility with
88 - # the prefix branch of portage, which also supports EPREFIX for all
89 - # EAPIs (for obvious reasons).
90 + # Prefix variables are supported beginning with EAPI 3.
91 if phase == "depend" or (
92 - "force-prefix" not in self.features
93 - and eapi is not None
94 + eapi is not None
95 and not eapi_supports_prefix(eapi)
96 ):
97 mydict.pop("ED", None)
98 diff --git a/man/make.conf.5 b/man/make.conf.5
99 index 34c3cd5b5..05832ce1c 100644
100 --- a/man/make.conf.5
101 +++ b/man/make.conf.5
102 @@ -1,4 +1,4 @@
103 -.TH "MAKE.CONF" "5" "Nov 2021" "Portage VERSION" "Portage"
104 +.TH "MAKE.CONF" "5" "Jan 2023" "Portage VERSION" "Portage"
105 .SH "NAME"
106 make.conf \- custom settings for Portage
107 .SH "SYNOPSIS"
108 @@ -522,12 +522,6 @@ fixes (order of flags, duplicated entries, ...)
109 Only fetch files from configured mirrors, ignoring \fBSRC_URI\fR,
110 except when \fImirror\fR is in the \fBebuild\fR(5) \fBRESTRICT\fR variable.
111 .TP
112 -.B force\-prefix
113 -Enable prefix support for all ebuilds, regardless of EAPI, since older EAPIs
114 -would otherwise be useless with prefix configurations. This brings
115 -compatibility with the prefix branch of portage, which also supports EPREFIX
116 -for all EAPIs (for obvious reasons).
117 -.TP
118 .B getbinpkg
119 Force emerges to always try to fetch files from the \fIPORTAGE_BINHOST\fR. See
120 \fBmake.conf\fR(5) for more information.
121 --
122 2.39.1