diff options
author | Brian Harring <ferringb@gmail.com> | 2023-12-25 13:45:08 -0800 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2023-12-26 19:43:58 +0200 |
commit | 1a54ac9c95fd230234f4c680ceda79a3de668b7f (patch) | |
tree | 544d70262596b92f22d1fd4a72ceb2a08317e6c3 | |
parent | Fix: parsing bug that allows a revision to be part of a package (diff) | |
download | pkgcore-1a54ac9c95fd230234f4c680ceda79a3de668b7f.tar.gz pkgcore-1a54ac9c95fd230234f4c680ceda79a3de668b7f.tar.bz2 pkgcore-1a54ac9c95fd230234f4c680ceda79a3de668b7f.zip |
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 <ferringb@gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
-rw-r--r-- | src/pkgcore/ebuild/atom.py | 3 |
1 files changed, 2 insertions, 1 deletions
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 ) |