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) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8B953158015 for ; Tue, 26 Dec 2023 22:03:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D2E012BC014; Tue, 26 Dec 2023 22:03:25 +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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B3D5C2BC014 for ; Tue, 26 Dec 2023 22:03:25 +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 991C1335DC2 for ; Tue, 26 Dec 2023 22:03:24 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D11DDED2 for ; Tue, 26 Dec 2023 22:03:22 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1703628111.fbd6909c24f51ad79fb313ddd7043b4a40de91a6.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: lib/_emerge/Scheduler.py X-VCS-Directories: lib/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: fbd6909c24f51ad79fb313ddd7043b4a40de91a6 X-VCS-Branch: master Date: Tue, 26 Dec 2023 22:03:22 +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: 3615aed5-6891-4320-a713-2c9b526f174c X-Archives-Hash: f3ae2686abd844098e0ae057b15432db commit: fbd6909c24f51ad79fb313ddd7043b4a40de91a6 Author: Zac Medico gentoo org> AuthorDate: Tue Dec 26 21:37:24 2023 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Dec 26 22:01:51 2023 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=fbd6909c Scheduler: Handle unpack_metadata SignatureException in _run_pkg_pretend This will handle the InvalidSignature exception that triggered bug 920258, allowing emerge --keep-going to skip the package if possible. All of the gpg stderr output is dumped before the exception is raised, as shown in bug 920258 comment #0. Bug: https://bugs.gentoo.org/920258 Signed-off-by: Zac Medico gentoo.org> lib/_emerge/Scheduler.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/_emerge/Scheduler.py b/lib/_emerge/Scheduler.py index 4193ffdd03..620d513511 100644 --- a/lib/_emerge/Scheduler.py +++ b/lib/_emerge/Scheduler.py @@ -992,7 +992,16 @@ class Scheduler(PollScheduler): infloc = os.path.join(build_dir_path, "build-info") ensure_dirs(infloc) - await bintree.dbapi.unpack_metadata(settings, infloc, loop=loop) + try: + await bintree.dbapi.unpack_metadata(settings, infloc, loop=loop) + except portage.exception.SignatureException as e: + writemsg( + f"!!! Invalid binary package: '{bintree.getname(x.cpv)}', {e}\n", + noiselevel=-1, + ) + failures += 1 + self._record_pkg_failure(x, settings, 1) + continue ebuild_path = os.path.join(infloc, x.pf + ".ebuild") settings.configdict["pkg"]["EMERGE_FROM"] = "binary" settings.configdict["pkg"]["MERGE_TYPE"] = "binary"