guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: publish: Simplify 'narinfo-string'.


From: guix-commits
Subject: 02/02: publish: Simplify 'narinfo-string'.
Date: Fri, 3 Sep 2021 04:43:45 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit e53d8a84c6fbf7641e7d0e6e8658da0bb01fcd71
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Sep 2 12:00:02 2021 +0200

    publish: Simplify 'narinfo-string'.
    
    This is a followup to 222f4661ed11b225f458cbe495a296f233129bec, which
    was intended to improve performance of 'narinfo-string'.
    
    * guix/scripts/publish.scm (narinfo-string): Remove 'catch' and
    'read-derivation-from-file' call when rendering "Deriver".
---
 guix/scripts/publish.scm | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/guix/scripts/publish.scm b/guix/scripts/publish.scm
index f67f81a..25846b7 100644
--- a/guix/scripts/publish.scm
+++ b/guix/scripts/publish.scm
@@ -364,18 +364,8 @@ References: ~a~%"
          ;; expensive to compute and is currently unused.
          (info       (if (not deriver)
                          base-info
-                         (catch 'system-error
-                           (lambda ()
-                             (let ((drv (read-derivation-from-file deriver)))
-                               (format #f "~aDeriver: ~a~%"
-                                       base-info (basename deriver))))
-                           (lambda args
-                             ;; DERIVER might be missing, but that's fine:
-                             ;; it's only used for <substitutable> where it's
-                             ;; optional.
-                             (if (= ENOENT (system-error-errno args))
-                                 base-info
-                                 (apply throw args))))))
+                         (format #f "~aDeriver: ~a~%"
+                                 base-info (basename deriver))))
          (signature  (base64-encode-string
                       (canonical-sexp->string (signed-string info)))))
     (format #f "~aSignature: 1;~a;~a~%" info (gethostname) signature)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]