guix-commits
[Top][All Lists]
Advanced

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

01/05: lint: patch-file-names: Simplify 'search-patch' error handling.


From: guix-commits
Subject: 01/05: lint: patch-file-names: Simplify 'search-patch' error handling.
Date: Thu, 12 Nov 2020 04:37:34 -0500 (EST)

civodul pushed a commit to branch version-1.2.0
in repository guix.

commit b73981369e414bfef6c4f8e48fc457a43c0e12cb
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Nov 12 09:29:05 2020 +0100

    lint: patch-file-names: Simplify 'search-patch' error handling.
    
    * guix/lint.scm (check-patch-file-names): Remove 'message-condition?'
    guard, which is useless since d51bfe242fbe6f3f8f71d723e8fe0c7bbe711ba1.
    Remove call to 'format' in the 'formatted-message?' case.
---
 guix/lint.scm | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/guix/lint.scm b/guix/lint.scm
index e1a77e8..91dbc80 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -663,17 +663,11 @@ from ~a")
 (define (check-patch-file-names package)
   "Emit a warning if the patches requires by PACKAGE are badly named or if the
 patch could not be found."
-  (guard (c ((message-condition? c)     ;raised by 'search-patch'
-             (list
-              ;; Use %make-warning, as condition-mesasge is already
-              ;; translated.
-              (%make-warning package (condition-message c)
-                             #:field 'patch-file-names)))
-            ((formatted-message? c)
+  (guard (c ((formatted-message? c)               ;raised by 'search-patch'
              (list (%make-warning package
-                                  (apply format #f
-                                         (G_ (formatted-message-string c))
-                                         (formatted-message-arguments c))))))
+                                  (formatted-message-string c)
+                                  (formatted-message-arguments c)
+                                  #:field 'source))))
     (define patches
       (match (package-source package)
         ((? origin? origin) (origin-patches origin))



reply via email to

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