From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id eB9LO1jDpGIoAAAAbAwnHQ (envelope-from ) for ; Sat, 11 Jun 2022 18:31:21 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id sOxQOljDpGJ66QAAG6o9tA (envelope-from ) for ; Sat, 11 Jun 2022 18:31:20 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8A08937713 for ; Sat, 11 Jun 2022 18:31:20 +0200 (CEST) Received: from localhost ([::1]:58370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o0419-0005nW-O2 for larch@yhetil.org; Sat, 11 Jun 2022 12:31:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40344) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o040s-0005lJ-1N for guix-patches@gnu.org; Sat, 11 Jun 2022 12:31:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59896) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o040r-0002n5-Q5 for guix-patches@gnu.org; Sat, 11 Jun 2022 12:31:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o040r-0000bp-NA for guix-patches@gnu.org; Sat, 11 Jun 2022 12:31:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55911] [PATCH] channels: Print backtrace when generating package cache fails. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 11 Jun 2022 16:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55911 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55911@debbugs.gnu.org Cc: Josselin Poiret X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16549650432298 (code B ref -1); Sat, 11 Jun 2022 16:31:01 +0000 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== 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 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches From: Josselin Poiret via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1654965080; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=t1uobXxw07Mz81YgXg72lYgyIEoK1CPXuQZiVdTOfHs=; b=XD1afP/abZI5APQ47xg/ZDKURhlEwfaPrex0a43UjiHR0bVXTrS8fuTLah5SLn1tTuOGOx WswVxGAl5F2/bczfSbsm7oTGooovmtsIhPqUr6d0cUX5n7dHgT6eeALpeRVjeEFqji5CVn fli1hsMOLqzOg433erm1NJY+HNKXJiM+xun5MPAPwDIks3Qn62Dj2TD/h7hf390uLfPmVH 5Y4QOCy22UjQoNnPdn3mn8TUh49Tk2QhQwPTyhv29DH5igWEETYWRxzspGnFs5kMnX+pKu 8H4IZ9bCkmxrdVH2g9x7XacU4+WlbBfb3S2UsOKJYM4p7SbcV1ibHQxFLa6cHQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654965080; a=rsa-sha256; cv=none; b=jgMD1/Gv627rdlU7zvz6ZwMlSlANrQ2niSspzkiKi+kKHs8POww8YvB0JcSL8/G0cPgNvG 8F3jTz0SYOuM9VgRv2/gro36kkgzLPvD6UTOAAiwNkmCQW3o3rpOY4fnjxO3NdDAdNmddN Gioil4lAddtw9XJRleSolY36TR4Ri8rhAUxMqVTHhKZdfKxI5BejeMrxoZJ3QlYP4N3gjc DV7jUgobwqzhFgnkEfQcyWFjKnUNnSEwEOplNo185BJx0el3UzupfUwPGAcwgLBMs1DCPZ OYJqs7Ix4WkrHnOQpVoZ9EtPMw5CxQiiwJSJ3u5UaZZ8VFUoJ6UUfY7EPNcUIg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b=iwC5kUHb; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.68 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b=iwC5kUHb; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 8A08937713 X-Spam-Score: -1.68 X-Migadu-Scanner: scn1.migadu.com X-TUID: IYTrN5UcijM9 * 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