diff mbox series

[bug#42615] guix: lint: Ignore unsupported source URL’s.

Message ID 20200730070518.GA3210@zpidnp36
State Accepted
Headers show
Series [bug#42615] guix: lint: Ignore unsupported source URL’s. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job

Commit Message

Lars-Dominik Braun July 30, 2020, 7:05 a.m. UTC
Hi,

in https://issues.guix.gnu.org/issue/42306 I noticed git:// URI’s in source
urls (see package nfs4-acl-tools) cause `guix lint` to fail currently. Attached
is a patch that fixes the issue, but I’m not sure that’s the “correct” way to
do it.

Cheers,
Lars

Comments

Mathieu Othacehe Aug. 1, 2020, 6:44 a.m. UTC | #1
Hello,

> in https://issues.guix.gnu.org/issue/42306 I noticed git:// URI’s in source
> urls (see package nfs4-acl-tools) cause `guix lint` to fail currently. Attached
> is a patch that fixes the issue, but I’m not sure that’s the “correct” way to
> do it.

I considered adding a warning saying that URI validation failed, but
I think it can be misleading and let the user think that something is
wrong with the package definition.

Anyway looks fine, pushed!

Thanks,

Mathieu
diff mbox series

Patch

From 23ff102a3883a8dedf911892c57a040f6a9e36b2 Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <ldb@leibniz-psychology.org>
Date: Thu, 30 Jul 2020 09:01:39 +0200
Subject: [PATCH] =?UTF-8?q?guix:=20lint:=20Ignore=20unsupported=20source?=
 =?UTF-8?q?=20URL=E2=80=99s.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* guix/lint.scm (check-source): Add match case for #f.
---
 guix/lint.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/guix/lint.scm b/guix/lint.scm
index 8a55f3e744..71ce931964 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -794,6 +794,9 @@  descriptions maintained upstream."
            (#t
             ;; We found a working URL, so stop right away.
             '())
+           (#f
+            ;; Unsupported URL or other error, skip.
+            (loop rest warnings))
            ((? lint-warning? warning)
             (loop rest (cons warning warnings))))))))
 
-- 
2.20.1