Skip to content

Commit 385f57b

Browse files
committed
_emerge: actions: drop redundant Atom(str(atom)) wrapper
vardb.match() calls match_from_list(), which uses only cp, cpv, use, operator, etc. -- none of which differ between an evaluated Atom and a freshly constructed Atom(str(evaluated_atom)). Pass the atom directly. Update the comment to drop the now-misleading Atom(str(atom)) reference. Signed-off-by: Matt Turner <mattst88@gentoo.org>
1 parent d89dd47 commit 385f57b

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

lib/_emerge/actions.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,17 +1183,11 @@ def unresolved_deps():
11831183
# visible in the unevaluated form of the atom. In this
11841184
# case, we must display the unevaluated atom, so that
11851185
# the user can see the conditional USE deps that would
1186-
# otherwise be invisible. Use Atom(str(atom)) to
1187-
# test for a package where this case would matter. This
1188-
# is not necessarily the same as atom.without_use,
1189-
# since Atom(str(atom)) may still contain some
1190-
# USE dependencies that remain after evaluation of
1186+
# otherwise be invisible. This is not necessarily the same as
1187+
# atom.without_use, since the evaluated atom may still contain
1188+
# some USE dependencies that remain after evaluation of
11911189
# conditionals.
1192-
if (
1193-
atom.package
1194-
and atom != atom.unevaluated_atom
1195-
and vardb.match(Atom(str(atom)))
1196-
):
1190+
if atom.package and atom != atom.unevaluated_atom and vardb.match(atom):
11971191
msg.append(f" {atom.unevaluated_atom} ({atom}) pulled in by:")
11981192
else:
11991193
msg.append(f" {atom} pulled in by:")

0 commit comments

Comments
 (0)