GNU bug report logs

#50814 [PATCH] guix: git-authenticate: Also authenticate the channel intro commit.

PackageSource(s)Maintainer(s)
guix-patches PTS Buildd Popcon
Full log

Message #111 received at 50814@debbugs.gnu.org (full text, mbox, reply):

Received: (at 50814) by debbugs.gnu.org; 18 Oct 2021 15:58:12 +0000
From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 18 11:58:12 2021
Received: from localhost ([127.0.0.1]:48323 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1mcV1g-00070b-Em
	for submit@debbugs.gnu.org; Mon, 18 Oct 2021 11:58:12 -0400
Received: from mail-ed1-f50.google.com ([209.85.208.50]:46839)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <attila.lendvai@gmail.com>) id 1mcV1X-0006z8-1Y
 for 50814@debbugs.gnu.org; Mon, 18 Oct 2021 11:58:03 -0400
Received: by mail-ed1-f50.google.com with SMTP id z20so867796edc.13
 for <50814@debbugs.gnu.org>; Mon, 18 Oct 2021 08:58:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=sender:from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=L7y/+COJjYPaozopnnQ+sBjtLR+/Y2RyAcjzRtsyLQc=;
 b=ibAfSRkNJk8HZXM0jK6b+ySD2dgUIF4xH9ZfyW4YGppNho1/Up0F1+uYlq1nyezmuL
 672I+TgHjrfCAKsvtxU2sKM/F+mpDf00T9AOJ2zdfY6UN4zqrj2J3sNMlNTeBXnpJyqn
 9fB4iNl3IejJFAZ7BHtTZVOyaboWak2KoVaL+CRRXZmX82zn7cmEd03zrBq0QfXsknvp
 cQkrDlWbmV4mjlG/kvJqmwTR7ZYHZWJw5aMicp9HZ1MNhnIETMxHoZfF8ChP5Q8FcrOH
 eolgW3S21dF3PI+0Evix6mgZXSN3cg54Id6x7qFLkMqIhIwPaeA6yYJRKpBtuJzKsWcH
 0sgw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:sender:from:to:cc:subject:date:message-id
 :in-reply-to:references:mime-version:content-transfer-encoding;
 bh=L7y/+COJjYPaozopnnQ+sBjtLR+/Y2RyAcjzRtsyLQc=;
 b=dlNDy6al67AKVRK/yGp6ARazOO7w7buVnhFL1OWcyasis6Sc1dmxe+hTvyjDPAc+zM
 hXSJb1q/MfMGv8KYFCN+JCKs00mQGcY4x9h6ykFx5ygN0wFb53itObZUM1pFk/18hq6a
 wibm0gfj7wJ4P/pvi1AGm2bXW2h0Fs4io9B6uMCDS1TNzKC4NotvDhO1QkwzsXHkQFG/
 uNtbSFG2dUlU5efAaDGXLREY0qIUAigASVxIHyUhUsYFw7G9Rf2OYxsjt2+bLdeekQxW
 TXYawG1mjgEHfI+/MFlHIm1zUdhjLmTufkoCosv3Kz3VLhW8gq3y0sgrg2lMfR9s+HM5
 atyg==
X-Gm-Message-State: AOAM532piEvBjc+UBntcRkpPtNomXk6LioYYVxvrteZ0YYMVa61joVws
 JbzlxMYrk14O8Q4y9Gv8WES6kn0Zwsk=
X-Google-Smtp-Source: ABdhPJzUB2aXYgZtnQtRRDX6Jik7IT3O8L1Fol4X67mEaG2skpWxVJ/UdQEkH9jpa81GNMZqwUm0BA==
X-Received: by 2002:aa7:ccc1:: with SMTP id y1mr46457408edt.177.1634572666944; 
 Mon, 18 Oct 2021 08:57:46 -0700 (PDT)
Received: from localhost.localdomain
 ([2a02:ab88:3710:6480:8fb4:66e9:57c0:8a0a])
 by smtp.gmail.com with ESMTPSA id n22sm8762059eja.120.2021.10.18.08.57.46
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 18 Oct 2021 08:57:46 -0700 (PDT)
From: Attila Lendvai <attila@lendvai.name>
To: 50814@debbugs.gnu.org
Subject: [PATCH 3/5] guix: Prepare the UI for continuable &warning exceptions.
Date: Mon, 18 Oct 2021 17:57:32 +0200
Message-Id: <20211018155734.5175-3-attila@lendvai.name>
X-Mailer: git-send-email 2.33.0
In-Reply-To: <20211018155734.5175-1-attila@lendvai.name>
References: <20211018155734.5175-1-attila@lendvai.name>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 50814
Cc: Attila Lendvai <attila@lendvai.name>
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit@debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request@debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-Spam-Score: -0.5 (/)
* guix/store.scm (call-with-store): Use dynamic-wind so that continuable
exceptions are not broken by being re-raised as non-continuable.  This is
needed for a later commit that uses continuable exceptions from within
git-authenticate to signal warnings to the user.  The reason for this is that
this way tests can explicitly check that a warning was signalled in certain
situations.
* guix/ui.scm (call-with-error-handling): Handle &warning type exceptions by
printing them to the user, and then continuing at the place they were
signalled at.
* guix/diagnostics.scm (emit-formatted-warning): New exported
function.
---
 guix/diagnostics.scm |  4 ++++
 guix/store.scm       |  7 +++++--
 guix/ui.scm          | 11 ++++++++++-
 3 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/guix/diagnostics.scm b/guix/diagnostics.scm
index 6a792febd4..343213fb45 100644
--- a/guix/diagnostics.scm
+++ b/guix/diagnostics.scm
@@ -48,6 +48,7 @@ (define-module (guix diagnostics)
             formatted-message?
             formatted-message-string
             formatted-message-arguments
+            emit-formatted-warning
 
             &fix-hint
             fix-hint?
@@ -161,6 +162,9 @@ (define-syntax-rule (leave args ...)
     (report-error args ...)
     (exit 1)))
 
+(define* (emit-formatted-warning fmt . args)
+  (emit-diagnostic fmt args #:prefix (G_ "warning: ") #:colors %warning-color))
+
 (define* (emit-diagnostic fmt args
                           #:key location (colors (color)) (prefix ""))
   "Report diagnostic message FMT with the given ARGS and the specified
diff --git a/guix/store.scm b/guix/store.scm
index 89a719bcfc..1b177cc952 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -34,6 +34,8 @@ (define-module (guix store)
   #:use-module (guix profiling)
   #:autoload   (guix build syscalls) (terminal-columns)
   #:use-module (rnrs bytevectors)
+  #:use-module ((rnrs conditions) #:select (warning?))
+  #:use-module ((rnrs exceptions) #:select (raise-continuable))
   #:use-module (ice-9 binary-ports)
   #:use-module ((ice-9 control) #:select (let/ec))
   #:use-module (ice-9 atomic)
@@ -661,8 +663,9 @@ (define (thunk)
             (apply values results)))))
 
     (with-exception-handler (lambda (exception)
-                              (close-connection store)
-                              (raise-exception exception))
+                              (unless (warning? exception)
+                                (close-connection store))
+                              (raise-continuable exception))
       thunk)))
 
 (define-syntax-rule (with-store store exp ...)
diff --git a/guix/ui.scm b/guix/ui.scm
index 1428c254b3..88940f99ef 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -69,6 +69,8 @@ (define-module (guix ui)
   #:use-module (srfi srfi-31)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
+  #:use-module ((rnrs conditions)
+                #:select (warning?))
   #:autoload   (ice-9 ftw)  (scandir)
   #:use-module (ice-9 match)
   #:use-module (ice-9 format)
@@ -689,7 +691,14 @@ (define (port-filename* port)
     (and (not (port-closed? port))
          (port-filename port)))
 
-  (guard* (c ((package-input-error? c)
+  (guard* (c ((warning? c)
+              (if (formatted-message? c)
+                  (apply emit-formatted-warning
+                         (formatted-message-string c)
+                         (formatted-message-arguments c))
+                  (emit-formatted-warning "~a" c))
+              '())
+             ((package-input-error? c)
               (let* ((package  (package-error-package c))
                      (input    (package-error-invalid-input c))
                      (location (package-location package))
-- 
2.33.0





Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Mon Sep 8 11:23:29 2025; Machine Name: wallace-server

GNU bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.