From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E98BE158015 for ; Tue, 26 Dec 2023 17:45:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 907AF2BC01D; Tue, 26 Dec 2023 17:45:15 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6EDE82BC01D for ; Tue, 26 Dec 2023 17:45:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 78AA033E3A9 for ; Tue, 26 Dec 2023 17:45:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EF4EF14B1 for ; Tue, 26 Dec 2023 17:45:12 +0000 (UTC) From: "Arthur Zamarin" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Arthur Zamarin" Message-ID: <1703612638.1a54ac9c95fd230234f4c680ceda79a3de668b7f.arthurzam@gentoo> Subject: [gentoo-commits] proj/pkgcore/pkgcore:master commit in: src/pkgcore/ebuild/ X-VCS-Repository: proj/pkgcore/pkgcore X-VCS-Files: src/pkgcore/ebuild/atom.py X-VCS-Directories: src/pkgcore/ebuild/ X-VCS-Committer: arthurzam X-VCS-Committer-Name: Arthur Zamarin X-VCS-Revision: 1a54ac9c95fd230234f4c680ceda79a3de668b7f X-VCS-Branch: master Date: Tue, 26 Dec 2023 17:45:12 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 79600398-bd26-4ba6-b7c2-cc2432673a03 X-Archives-Hash: 022c957ffaf5acf88b3847483dac3604 commit: 1a54ac9c95fd230234f4c680ceda79a3de668b7f Author: Brian Harring gmail com> AuthorDate: Mon Dec 25 21:45:08 2023 +0000 Commit: Arthur Zamarin gentoo org> CommitDate: Tue Dec 26 17:43:58 2023 +0000 URL: https://gitweb.gentoo.org/proj/pkgcore/pkgcore.git/commit/?id=1a54ac9c 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 gmail.com> Signed-off-by: Arthur Zamarin gentoo.org> src/pkgcore/ebuild/atom.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pkgcore/ebuild/atom.py b/src/pkgcore/ebuild/atom.py index f8725f607..0dc046fa4 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 )