commit: e735adab9bd0ba472260dc7f529cdb3ce11865cd
Author: Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Sat Oct 14 07:00:40 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Sep 14 09:34:39 2025 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e735adab
Remove leftovers from {FEATURES->USE}=test removal
* FEATURES="test" was binded to USE="test" in 6b19f71, but this was
effectively removed in 8c5598c.
* This change removes mentions of this now bygone feature and unused
codepaths associated with it.
Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Part-of: https://github.com/gentoo/portage/pull/1129
Closes: https://github.com/gentoo/portage/pull/1129
Signed-off-by: Sam James <sam <AT> gentoo.org>
lib/_emerge/depgraph.py | 4 ----
lib/_emerge/resolver/output.py | 4 ----
lib/_emerge/resolver/output_helpers.py | 5 +----
lib/portage/eapi.py | 3 ---
lib/portage/package/ebuild/config.py | 18 ------------------
man/emerge.1 | 11 +----------
man/make.conf.5 | 7 ++-----
7 files changed, 4 insertions(+), 48 deletions(-)
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index a6e63c058c..87d090ae3b 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -50,7 +50,6 @@ from portage.exception import (
from portage.output import colorize, create_color_func, darkgreen, green
bad = create_color_func("BAD")
-from portage.package.ebuild.config import _get_feature_flags
from portage.package.ebuild.getmaskingstatus import _getmaskingstatus,
_MaskReason
from portage._sets import SETPREFIX
from portage._sets.base import InternalPackageSet
@@ -2959,21 +2958,18 @@ class depgraph:
) in ("y", "auto")
newuse = "--newuse" in self._frozen_config.myopts
changed_use = "changed-use" ==
self._frozen_config.myopts.get("--reinstall")
- feature_flags = _get_feature_flags(_get_eapi_attrs(pkg.eapi))
if newuse or (binpkg_respect_use and not changed_use):
flags = set(orig_iuse)
flags ^= cur_iuse
flags -= forced_flags
flags |= orig_iuse.intersection(orig_use) ^
cur_iuse.intersection(cur_use)
- flags -= feature_flags
if flags:
return flags
elif changed_use or binpkg_respect_use:
flags = set(orig_iuse)
flags.intersection_update(orig_use)
flags ^= cur_iuse.intersection(cur_use)
- flags -= feature_flags
if flags:
return flags
return None
diff --git a/lib/_emerge/resolver/output.py b/lib/_emerge/resolver/output.py
index 831076c8ae..930a75678d 100644
--- a/lib/_emerge/resolver/output.py
+++ b/lib/_emerge/resolver/output.py
@@ -12,10 +12,8 @@ __all__ = (
from portage import os
from portage.dbapi.dep_expand import dep_expand
from portage.dep import Atom, cpvequal, _repo_separator, _slot_separator
-from portage.eapi import _get_eapi_attrs
from portage.exception import InvalidDependString, SignatureException
from portage.localization import localized_size
-from portage.package.ebuild.config import _get_feature_flags
from portage.package.ebuild._spawn_nofetch import spawn_nofetch
from portage.output import (
blue,
@@ -246,7 +244,6 @@ class Display:
use_expand = sorted(self.use_expand)
use_expand.insert(0, "USE")
- feature_flags = _get_feature_flags(_get_eapi_attrs(pkg.eapi))
for key in use_expand:
if key in self.use_expand_hidden:
@@ -260,7 +257,6 @@ class Display:
old_iuse_map[key],
old_use_map[key],
is_new,
- feature_flags,
reinst_flags_map.get(key),
)
diff --git a/lib/_emerge/resolver/output_helpers.py
b/lib/_emerge/resolver/output_helpers.py
index 3669f3b6c2..fe8daafd70 100644
--- a/lib/_emerge/resolver/output_helpers.py
+++ b/lib/_emerge/resolver/output_helpers.py
@@ -267,7 +267,6 @@ def _create_use_string(
old_iuse,
old_use,
is_new,
- feature_flags,
reinst_flags,
):
if not conf.print_use_string:
@@ -322,9 +321,7 @@ def _create_use_string(
elif flag in old_use:
flag_str = green("-" + flag) + "*"
if flag_str:
- if flag in feature_flags:
- flag_str = "{" + flag_str + "}"
- elif flag in iuse_forced:
+ if flag in iuse_forced:
flag_str = "(" + flag_str + ")"
if isEnabled:
enabled.append(flag_str)
diff --git a/lib/portage/eapi.py b/lib/portage/eapi.py
index 523156892e..89cfce6f41 100644
--- a/lib/portage/eapi.py
+++ b/lib/portage/eapi.py
@@ -168,7 +168,6 @@ _eapi_attrs = collections.namedtuple(
"exports_pms_vars",
"exports_PORTDIR",
"exports_replace_vars",
- "feature_flag_test",
"idepend",
"iuse_defaults",
"iuse_effective",
@@ -249,7 +248,6 @@ def _get_eapi_attrs(eapi_str: Optional[str]) -> _eapi_attrs:
exports_pms_vars=True,
exports_PORTDIR=True,
exports_replace_vars=True,
- feature_flag_test=False,
idepend=False,
iuse_defaults=True,
iuse_effective=False,
@@ -290,7 +288,6 @@ def _get_eapi_attrs(eapi_str: Optional[str]) -> _eapi_attrs:
exports_pms_vars=eapi <= Eapi("8"),
exports_PORTDIR=eapi <= Eapi("6"),
exports_replace_vars=eapi >= Eapi("4"),
- feature_flag_test=False,
idepend=eapi >= Eapi("8"),
iuse_defaults=eapi >= Eapi("1"),
iuse_effective=eapi >= Eapi("5"),
diff --git a/lib/portage/package/ebuild/config.py
b/lib/portage/package/ebuild/config.py
index fa190ab173..272fcdb5d1 100644
--- a/lib/portage/package/ebuild/config.py
+++ b/lib/portage/package/ebuild/config.py
@@ -106,24 +106,6 @@ from portage.package.ebuild._config.helper import (
)
-_feature_flags_cache = {}
-
-
-def _get_feature_flags(eapi_attrs):
- cache_key = (eapi_attrs.feature_flag_test,)
- flags = _feature_flags_cache.get(cache_key)
- if flags is not None:
- return flags
-
- flags = []
- if eapi_attrs.feature_flag_test:
- flags.append("test")
-
- flags = frozenset(flags)
- _feature_flags_cache[cache_key] = flags
- return flags
-
-
def autouse(myvartree, use_cache=1, mysettings=None):
warnings.warn("portage.autouse() is deprecated", DeprecationWarning,
stacklevel=2)
return ""
diff --git a/man/emerge.1 b/man/emerge.1
index 7964074dc3..3231dd81d4 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -1,4 +1,4 @@
-.TH "EMERGE" "1" "May 2024" "Portage @VERSION@" "Portage"
+.TH "EMERGE" "1" "Sep 2025" "Portage @VERSION@" "Portage"
.SH "NAME"
emerge \- Command\-line interface to the Portage system
.SH "SYNOPSIS"
@@ -509,10 +509,6 @@ changed since installation. This option also implies the
\fB\-\-selective\fR option. Unlike \fB\-\-newuse\fR, the
\fB\-\-changed\-use\fR option does not trigger reinstallation when
flags that the user has not enabled are added or removed.
-
-NOTE: This option ignores the state of the "test" USE flag, since that flag
-has a special binding to FEATURES="test" (see \fBmake.conf\fR(5) for more
-information about \fBFEATURES\fR settings).
.TP
.BR "\-\-color < y | n >"
Enable or disable color output. This option will override \fINO_COLOR\fR
@@ -735,10 +731,6 @@ settings. If you would like to skip rebuilds for which
disabled flags have
been added to or removed from IUSE, see the related
\fB\-\-changed\-use\fR option. If you would like to skip rebuilds for
specific packages, see the \fB\-\-exclude\fR option.
-
-NOTE: This option ignores the state of the "test" USE flag, since that flag
-has a special binding to FEATURES="test" (see \fBmake.conf\fR(5) for more
-information about \fBFEATURES\fR settings).
.TP
.BR \-\-noconfmem
Causes portage to disregard merge records indicating that a config file
@@ -1101,7 +1093,6 @@ Symbol Location Meaning
* suffix transition to or from the enabled state
% suffix newly added or removed
() circumfix forced, masked, or removed
-{} circumfix state is bound to FEATURES settings
.TE
.TP
.BR \-\-verbose\-conflicts
diff --git a/man/make.conf.5 b/man/make.conf.5
index 066e7759c9..c237e184bb 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -1,4 +1,4 @@
-.TH "MAKE.CONF" "5" "Aug 2024" "Portage @VERSION@" "Portage"
+.TH "MAKE.CONF" "5" "Sep 2025" "Portage @VERSION@" "Portage"
.SH "NAME"
make.conf \- custom settings for Portage
.SH "SYNOPSIS"
@@ -805,10 +805,7 @@ bits from any file that is not listed in
\fI/etc/portage/suidctl.conf\fR.
Run package\-specific tests during each merge to help make sure
the package compiled properly. See \fItest\fR in \fBebuild\fR(1)
and \fIsrc_test()\fR in \fBebuild\fR(5). This feature implies the "test"
-\fBUSE\fR flag if it is a member of \fBIUSE\fR, either explicitly or
-implicitly (see \fBebuild\fR(5) for more information about \fBIUSE\fR).
-The "test" \fBUSE\fR flag is also automatically disabled when the
-"test" feature is disabled.
+\fBUSE\fR flag.
.TP
.B test\-fail\-continue
If "test" is enabled \fBFEATURES\fR and the test phase of an ebuild fails,