From unknown Thu Jun 19 14:08:16 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#55911 <55911@debbugs.gnu.org> To: bug#55911 <55911@debbugs.gnu.org> Subject: Status: [PATCH] channels: Print backtrace when generating package cache fails. Reply-To: bug#55911 <55911@debbugs.gnu.org> Date: Thu, 19 Jun 2025 21:08:16 +0000 retitle 55911 [PATCH] channels: Print backtrace when generating package cac= he fails. reassign 55911 guix-patches submitter 55911 Josselin Poiret severity 55911 normal tag 55911 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 11 12:30:43 2022 Received: (at submit) by debbugs.gnu.org; 11 Jun 2022 16:30:43 +0000 Received: from localhost ([127.0.0.1]:53791 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o040Y-0000ay-Op for submit@debbugs.gnu.org; Sat, 11 Jun 2022 12:30:43 -0400 Received: from lists.gnu.org ([209.51.188.17]:37156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o040W-0000aj-QH for submit@debbugs.gnu.org; Sat, 11 Jun 2022 12:30:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40296) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o040W-0005Rm-Go for guix-patches@gnu.org; Sat, 11 Jun 2022 12:30:40 -0400 Received: from jpoiret.xyz ([206.189.101.64]:44132) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o040U-0002lf-UR for guix-patches@gnu.org; Sat, 11 Jun 2022 12:30:40 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id A9979184F27; Sat, 11 Jun 2022 16:30:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1654965036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=t1uobXxw07Mz81YgXg72lYgyIEoK1CPXuQZiVdTOfHs=; b=iwC5kUHb09ui4+mchvCXYB5UaojiPoU2jqmCXWFTvslIhKrJxabag/TRaDYD/yg+g1J2BK DspdnnoM1a8UTT+w8Vp0/yT/8X23BkqcDsnZSEU8VTpcduVPZIvaLv2r+zNsHLGwgCXqOs WAK9HhGQ1KrEwpHrj/gkqGns4XLKJ81OayKsxtu3/ibFkEBiCQT405EkMQBRnWjHS5B03Z bE8lL2zLP2T+Y8OKskHxLCR/9cFIYMO2FMQ+cKhTgbToKLp7clffL/q9Pq6Yc2xESQpA5u /kndaYgFPJbadIvJuIOKLe4IgU/kaRqLYaIayxGctpLPT6CtX3GyJiVtCxA9aA== From: Josselin Poiret To: guix-patches@gnu.org Subject: [PATCH] channels: Print backtrace when generating package cache fails. Date: Sat, 11 Jun 2022 18:30:31 +0200 Message-Id: <20220611163031.23673-1-dev@jpoiret.xyz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spam-Level: **** X-Spamd-Bar: ++++ Received-SPF: pass client-ip=206.189.101.64; envelope-from=dev@jpoiret.xyz; helo=jpoiret.xyz X-Spam_score_int: 24 X-Spam_score: 2.4 X-Spam_bar: ++ X-Spam_report: (2.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.499, FROM_SUSPICIOUS_NTLD_FP=1.997, PDS_OTHER_BAD_TLD=1.997, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 2.7 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * guix/channels.scm (package-cache-file): Add a throw handler around the generate-package-cache call, and print backtrace in it. --- guix/channels.scm | 12 +++++++++++- 1 file changed, 11 insertions(+ [...] Content analysis details: (2.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom; id=dev%40jpoiret.xyz; ip=209.51.188.17; r=debbugs.gnu.org] 1.6 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: jpoiret.xyz (xyz)] 2.0 FROM_SUSPICIOUS_NTLD_FP From abused NTLD 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: submit Cc: Josselin Poiret X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) * guix/channels.scm (package-cache-file): Add a throw handler around the generate-package-cache call, and print backtrace in it. --- guix/channels.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/guix/channels.scm b/guix/channels.scm index 20f347d34f..e3a4daf7b3 100644 --- a/guix/channels.scm +++ b/guix/channels.scm @@ -911,7 +911,17 @@ (define build (format (current-error-port) "Generating package cache for '~a'...~%" #$profile) - (generate-package-cache #$output)) + ;; This script runs through (primitive-load), which by default + ;; doesn't print backtraces when it encounters an exception, + ;; so manually do it. Use with-throw-handler because it is + ;; supported by all Guile versions. + (with-throw-handler #t + (lambda () (generate-package-cache #$output)) + (lambda (key . args) + ;; Guile 1 prints the whole backtrace, and would need a + ;; fluid set for the backtrace procedure to work, so ignore. + (unless (string-prefix? "1" (version)) + (backtrace))))) (mkdir #$output)))) (gexp->derivation-in-inferior "guix-package-cache" build -- 2.36.1 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 11 12:59:44 2022 Received: (at 55911) by debbugs.gnu.org; 11 Jun 2022 16:59:44 +0000 Received: from localhost ([127.0.0.1]:53822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o04Sd-0001M2-Ua for submit@debbugs.gnu.org; Sat, 11 Jun 2022 12:59:44 -0400 Received: from jpoiret.xyz ([206.189.101.64]:36732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o04Sb-0001Lr-JE for 55911@debbugs.gnu.org; Sat, 11 Jun 2022 12:59:42 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 12C38184C00; Sat, 11 Jun 2022 16:59:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1654966780; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ql/D4qtkaWzVGcsfTHIzfcPdbSTudEQzs33tSEqM/p8=; b=EF5RTiunRTKDp+G2dcRiJxQqgXrAPRSwm9JE3lsix2VOJ21Vam0gEOMvaaWPgxarwycZgJ iUZt8gkFk9cSUwWMSgwvROFCLo8XxluxtGgGNIgAQHOactR8q4VcFlG3711vDFl5Qy/Gjd 4kTEkYSODS7evPMbbs4hDn9ZVZaVSyxONkPnxc30kuLsegKnS6gT/hKdUkNRERXHlnVr6Y XNUo0R6SWGt6IJJslsxabEMAhaoWwPmovhUc8Pvad+sekYbwBRWIEumhjzPD/08XgShXzA Z0DOv9ZGhJTteabz4G4KUrFcveTBV7h1Q+Pn5AeaiCh0xDCRPFR8qh6X8ARuEQ== From: Josselin Poiret To: Josselin Poiret Subject: [PATCH v2] channels: Print backtrace when generating package cache fails. Date: Sat, 11 Jun 2022 18:59:38 +0200 Message-Id: <20220611165938.25093-1-dev@jpoiret.xyz> In-Reply-To: <20220611163031.23673-1-dev@jpoiret.xyz> References: <20220611163031.23673-1-dev@jpoiret.xyz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spamd-Bar: / X-Spam-Score: 2.1 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * guix/channels.scm (package-cache-file): Add a throw handler around the generate-package-cache call, and print backtrace in it. --- IRC promptly pointed out that Guix has required Guile ver>=2 since [...] Content analysis details: (2.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 1.6 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: jpoiret.xyz (xyz)] 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: 55911 Cc: 55911@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * guix/channels.scm (package-cache-file): Add a throw handler around the generate-package-cache call, and print backtrace in it. --- IRC promptly pointed out that Guix has required Guile ver>=2 since [...] Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 1.6 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: jpoiret.xyz (xyz)] 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager * guix/channels.scm (package-cache-file): Add a throw handler around the generate-package-cache call, and print backtrace in it. --- IRC promptly pointed out that Guix has required Guile ver>=2 since way before guix repl and guix pull were ever a thing, thus drop the Guile 1 compatibility code. Enjoy this v2 Best, Josselin guix/channels.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/guix/channels.scm b/guix/channels.scm index 20f347d34f..fde425327d 100644 --- a/guix/channels.scm +++ b/guix/channels.scm @@ -911,7 +911,14 @@ (define build (format (current-error-port) "Generating package cache for '~a'...~%" #$profile) - (generate-package-cache #$output)) + ;; This script runs through (primitive-load), which by default + ;; doesn't print backtraces when it encounters an exception, + ;; so manually do it. Use with-throw-handler because it is + ;; supported by all Guile versions. + (with-throw-handler #t + (lambda () (generate-package-cache #$output)) + (lambda (key . args) + (backtrace)))) (mkdir #$output)))) (gexp->derivation-in-inferior "guix-package-cache" build -- 2.36.1 From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 16 05:10:57 2022 Received: (at 55911-done) by debbugs.gnu.org; 16 Jun 2022 09:10:57 +0000 Received: from localhost ([127.0.0.1]:40733 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1lWj-0008Gb-EW for submit@debbugs.gnu.org; Thu, 16 Jun 2022 05:10:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35542) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1lWi-0008GN-Gl for 55911-done@debbugs.gnu.org; Thu, 16 Jun 2022 05:10:56 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55918) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1lWd-00073p-6a; Thu, 16 Jun 2022 05:10:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=+9DDVDMHBi3rAROcuAXzyrDvfdgA4SP9hMwU6IRyU1A=; b=N+bjXg91GD946Y8JhFZ7 ZsXjLjA31KkogVTzpZ8VJBFJXrC3lTYO8X3bT88RQiK7bu12jpR7Hp83d6lgFXDSg9zTgFiYMkeGG N/NSZ6RcrBS0+NKhw7wxuIr0RldhYRZqwp6VMDdL6JFHYbPp1jadz8iDXQ0yVMNgR73qFOcqqO1PB 7TCgFEECuS0pVcAqjLMXTJqQhkDY3JlWhBU9zsQfl8ykJ7eEvtgFpjoOPzdhJ5YG6ij+2sJgu1VXR YMjMXKYvW50amJnhx9zE8KgKi+kwyGb7rwDc8CEF/d2xjdlE/9dvxtsBFkrpVpqxShHCpsFqJKVMH g177sHBmePvSCA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:65448 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1lWc-0008Db-QD; Thu, 16 Jun 2022 05:10:51 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Josselin Poiret Subject: Re: bug#55911: [PATCH] channels: Print backtrace when generating package cache fails. References: <20220611163031.23673-1-dev@jpoiret.xyz> <20220611165938.25093-1-dev@jpoiret.xyz> Date: Thu, 16 Jun 2022 11:10:49 +0200 In-Reply-To: <20220611165938.25093-1-dev@jpoiret.xyz> (Josselin Poiret's message of "Sat, 11 Jun 2022 18:59:38 +0200") Message-ID: <87sfo5m0rq.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 55911-done Cc: 55911-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi Josselin, Josselin Poiret skribis: > * guix/channels.scm (package-cache-file): Add a throw handler around > the generate-package-cache call, and print backtrace in it. > --- > IRC promptly pointed out that Guix has required Guile ver>=3D2 since way = before > guix repl and guix pull were ever a thing, thus drop the Guile 1 compatib= ility > code. Enjoy this v2 That=E2=80=99s a good idea. Applied! Thanks for the patch and for paying attention to compatibility! Ludo=E2=80=99. From unknown Thu Jun 19 14:08:16 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 14 Jul 2022 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator