From 1a54ac9c95fd230234f4c680ceda79a3de668b7f Mon Sep 17 00:00:00 2001 From: Brian Harring Date: Mon, 25 Dec 2023 13:45:08 -0800 Subject: atom: limit the start of a slot to left of use components. It's a minor redundant protection + optimization, but it's worth ensuring the only spot considered for a slot prefix is left of any use restrictions. Signed-off-by: Brian Harring Signed-off-by: Arthur Zamarin --- src/pkgcore/ebuild/atom.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/pkgcore/ebuild/atom.py b/src/pkgcore/ebuild/atom.py index f8725f60..0dc046fa 100644 --- a/src/pkgcore/ebuild/atom.py +++ b/src/pkgcore/ebuild/atom.py @@ -99,7 +99,8 @@ class atom(boolean.AndRestriction, metaclass=klass.generic_equality): orig_atom = atom override_kls = False use_start = atom.find("[") - slot_start = atom.find(":") + # ensure slot or repo anchoring is left of use flags. + slot_start = atom.find(":", 0, use_start) eapi_obj = eapi_mod.get_eapi( eapi if eapi != "-1" else eapi_mod.LATEST_PMS_EAPI_VER ) -- cgit v1.2.3-65-gdbad