[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/repology 21690f6: repology-license: Properly handle "Un
From: |
Nicolas Goaziou |
Subject: |
[elpa] externals/repology 21690f6: repology-license: Properly handle "Unknown" vote results |
Date: |
Tue, 19 Jan 2021 08:25:57 -0500 (EST) |
branch: externals/repology
commit 21690f6007ac79eb9555d2ff0a63c5a4f639d76a
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Commit: Nicolas Goaziou <mail@nicolasgoaziou.fr>
repology-license: Properly handle "Unknown" vote results
* repology-license.el (repology--license-vote): Fix return value when
a license check does not return a boolean (i.e., the repository
passes).
---
repology-license.el | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/repology-license.el b/repology-license.el
index c60388a..cbe8781 100644
--- a/repology-license.el
+++ b/repology-license.el
@@ -300,7 +300,15 @@ REPOSITORY is an element from
`repology-license-reference-repositories'.
PACKAGE is a package object."
(pcase (or repository (repology--license-find-reference-repository package))
(`(,_ ,_ ,(and (pred functionp) p))
- (seq-every-p p (repology-package-field package 'licenses)))
+ (catch :vote
+ (dolist (l (repology-package-field package 'licenses))
+ ;; For a vote to be "Free", every license string must be
+ ;; free. However, we stop at first "Unknown" or "Non-Free"
+ ;; result.
+ (pcase (funcall p t)
+ ('t nil)
+ (other (throw :vote other))))
+ t))
(`(,_ ,_ ,boolean) boolean)
(other (error "Wrong repository definition: %S" other))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/repology 21690f6: repology-license: Properly handle "Unknown" vote results,
Nicolas Goaziou <=