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 57004158089 for ; Fri, 13 Oct 2023 10:19:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5F6622BC015; Fri, 13 Oct 2023 10:19:08 +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 18B222BC014 for ; Fri, 13 Oct 2023 10:19:08 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4B747335C34 for ; Fri, 13 Oct 2023 10:19:07 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C15081184 for ; Fri, 13 Oct 2023 10:19:05 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1697192341.c16ff6913b3d0a4d4ea0f6ee811ece541865bd8f.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/package/ebuild/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/package/ebuild/config.py X-VCS-Directories: lib/portage/package/ebuild/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: c16ff6913b3d0a4d4ea0f6ee811ece541865bd8f X-VCS-Branch: master Date: Fri, 13 Oct 2023 10:19:05 +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: 1138fec0-9ceb-4adc-bfc6-a09717af5b58 X-Archives-Hash: b73158e6eb3c7e28f824ec9550539ba2 commit: c16ff6913b3d0a4d4ea0f6ee811ece541865bd8f Author: Raul E Rangel chromium org> AuthorDate: Wed Oct 11 18:42:34 2023 +0000 Commit: Sam James gentoo org> CommitDate: Fri Oct 13 10:19:01 2023 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=c16ff691 config: Sort USE_EXPAND variables Without the sort, we end up extending the USE_EXPAND variables with a non deterministic ordering. This makes binary package creation non hermetic. i.e., ``` -declare -x PYTHON_TARGETS="python3_8 python3_7 python3_6 python3_10 python3_9" +declare -x PYTHON_TARGETS="python3_8 python3_9 python3_10 python3_7 python3_6" ``` Assuming `PYTHON_TARGETS=python3_8` in make.conf, after this change we get: ``` declare -x PYTHON_TARGETS="python3_8 python3_10 python3_6 python3_7 python3_9" ``` Ideally we would completely sort the USE_EXPAND variables, but the LINGUAS variable appears to need a very specific ordering. Bug: https://bugs.gentoo.org/914441 Signed-off-by: Raul E Rangel chromium.org> Closes: https://github.com/gentoo/portage/pull/1098 Signed-off-by: Sam James gentoo.org> lib/portage/package/ebuild/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/portage/package/ebuild/config.py b/lib/portage/package/ebuild/config.py index 3ee7fd65ed..049c5fa169 100644 --- a/lib/portage/package/ebuild/config.py +++ b/lib/portage/package/ebuild/config.py @@ -1746,7 +1746,7 @@ class config: # Preserve the order of var_split because it can matter for things # like LINGUAS. var_split = [x for x in var_split if x in expand_flags] - var_split.extend(expand_flags.difference(var_split)) + var_split.extend(sorted(expand_flags.difference(var_split))) has_wildcard = "*" in expand_flags if has_wildcard: var_split = [x for x in var_split if x != "*"]