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 BD529158020 for ; Sat, 29 Oct 2022 11:56:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E7603E08C4; Sat, 29 Oct 2022 11:56:51 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CEE0FE08C4 for ; Sat, 29 Oct 2022 11:56:51 +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 A49BD34108E for ; Sat, 29 Oct 2022 11:56:50 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1609C617 for ; Sat, 29 Oct 2022 11:56:49 +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: <1667044602.e7aeda0fdec527e99e40af05865689e27ed01cbd.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/profiles.py X-VCS-Directories: src/pkgcore/ebuild/ X-VCS-Committer: arthurzam X-VCS-Committer-Name: Arthur Zamarin X-VCS-Revision: e7aeda0fdec527e99e40af05865689e27ed01cbd X-VCS-Branch: master Date: Sat, 29 Oct 2022 11:56:49 +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: 0e43543e-a9ad-4514-8649-af9f9c200514 X-Archives-Hash: 02e7b9f9ae7e01aa9759c04060a01451 commit: e7aeda0fdec527e99e40af05865689e27ed01cbd Author: Arthur Zamarin gentoo org> AuthorDate: Sat Oct 29 11:45:24 2022 +0000 Commit: Arthur Zamarin gentoo org> CommitDate: Sat Oct 29 11:56:42 2022 +0000 URL: https://gitweb.gentoo.org/proj/pkgcore/pkgcore.git/commit/?id=e7aeda0f ebuild.profiles: error out when using USE_EXAPND in package.mask portage fails to parse this syntax when used for package.use files under a profile, and pkgcore parses it incorrectly. So in case such syntax is detected, error out (which will cause a ProfileError with pkgcheck). Resolves: https://github.com/pkgcore/pkgcheck/issues/370 Signed-off-by: Arthur Zamarin gentoo.org> src/pkgcore/ebuild/profiles.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pkgcore/ebuild/profiles.py b/src/pkgcore/ebuild/profiles.py index 34e839e9b..17805edaa 100644 --- a/src/pkgcore/ebuild/profiles.py +++ b/src/pkgcore/ebuild/profiles.py @@ -329,6 +329,9 @@ class ProfileNode(metaclass=caching.WeakInstMeta): if len(l) == 1: logger.error(f'{relpath!r}, line {lineno}: missing USE flag(s): {line!r}') continue + if any(s.endswith(':') for s in l[1:]): + logger.error(f'{relpath!r}, line {lineno}: USE_EXPAND syntax is invalid in this context: {line!r}') + continue d[a.key].append(misc.chunked_data(a, *split_negations(l[1:]))) return ImmutableDict((k, misc._build_cp_atom_payload(v, atom(k)))