Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove leftovers from {FEATURES->USE}=test removal #1129

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions lib/_emerge/depgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
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
Expand Down Expand Up @@ -2906,21 +2905,18 @@ def _reinstall_for_flags(
) 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
Expand Down
4 changes: 0 additions & 4 deletions lib/_emerge/resolver/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@
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,
Expand Down Expand Up @@ -246,7 +244,6 @@ def _display_use(self, pkg, pkg_info):

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:
Expand All @@ -260,7 +257,6 @@ def _display_use(self, pkg, pkg_info):
old_iuse_map[key],
old_use_map[key],
is_new,
feature_flags,
reinst_flags_map.get(key),
)

Expand Down
5 changes: 1 addition & 4 deletions lib/_emerge/resolver/output_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ def _create_use_string(
old_iuse,
old_use,
is_new,
feature_flags,
reinst_flags,
):
if not conf.print_use_string:
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 0 additions & 3 deletions lib/portage/eapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ def eapi_has_sysroot(eapi: str) -> bool:
"exports_merge_type",
"exports_PORTDIR",
"exports_replace_vars",
"feature_flag_test",
"idepend",
"iuse_defaults",
"iuse_effective",
Expand Down Expand Up @@ -231,7 +230,6 @@ def _get_eapi_attrs(eapi_str: Optional[str]) -> _eapi_attrs:
exports_merge_type=True,
exports_PORTDIR=True,
exports_replace_vars=True,
feature_flag_test=False,
idepend=False,
iuse_defaults=True,
iuse_effective=False,
Expand Down Expand Up @@ -264,7 +262,6 @@ def _get_eapi_attrs(eapi_str: Optional[str]) -> _eapi_attrs:
exports_merge_type=eapi >= Eapi("4"),
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"),
Expand Down
18 changes: 0 additions & 18 deletions lib/portage/package/ebuild/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,24 +107,6 @@
)


_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 ""
Expand Down
11 changes: 1 addition & 10 deletions man/emerge.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH "EMERGE" "1" "Mar 2023" "Portage @VERSION@" "Portage"
.TH "EMERGE" "1" "Oct 2023" "Portage @VERSION@" "Portage"
.SH "NAME"
emerge \- Command\-line interface to the Portage system
.SH "SYNOPSIS"
Expand Down Expand Up @@ -507,10 +507,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
Expand Down Expand Up @@ -733,10 +729,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
Expand Down Expand Up @@ -1104,7 +1096,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
Expand Down
7 changes: 2 additions & 5 deletions man/make.conf.5
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH "MAKE.CONF" "5" "Mar 2023" "Portage @VERSION@" "Portage"
.TH "MAKE.CONF" "5" "Oct 2023" "Portage @VERSION@" "Portage"
.SH "NAME"
make.conf \- custom settings for Portage
.SH "SYNOPSIS"
Expand Down Expand Up @@ -762,10 +762,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,
Expand Down
Loading