* bug#66461: importer opam: unsupported type in string-ci=?
@ 2023-10-11 9:06 Simon Tournier
2023-10-15 9:38 ` bug#66461: [PATCH] guix: import: opam: Handle list of licenses Josselin Poiret via Bug reports for GNU Guix
0 siblings, 1 reply; 3+ messages in thread
From: Simon Tournier @ 2023-10-11 9:06 UTC (permalink / raw)
To: 66461
Hi,
Using Guix 6113e05, I get this error:
--8<---------------cut here---------------start------------->8---
$ guix import opam odig
Starting download of /tmp/guix-file.Yahnl4
From https://erratique.ch/software/odig/releases/odig-0.0.9.tbz...
odig-0.0.9.tbz 11.2MiB 550KiB/s 00:21 ▕██████████████████▏ 100.0%
Backtrace:
8 (primitive-load "/home/simon/.config/guix/current/bin/guix")
In guix/ui.scm:
2323:7 7 (run-guix . _)
2286:10 6 (run-guix-command _ . _)
In guix/scripts/import.scm:
90:11 5 (guix-import . _)
In guix/scripts/import/opam.scm:
105:24 4 (guix-import-opam . _)
In guix/import/opam.scm:
382:24 3 (opam->guix-package _ #:repo _ #:version _)
In guix/import/utils.scm:
300:2 2 (spdx-string->license ((string-pat "ISC") (string-pat "LicenseRef-ParaType-Free-Font-License") (# …)))
In srfi/srfi-1.scm:
939:17 1 (assoc ((string-pat "ISC") (string-pat "LicenseRef-ParaType-Free-Font-License") (string-pat "Li…")) _ …)
In unknown file:
0 (string-ci=? ((string-pat "ISC") (string-pat "LicenseRef-ParaType-Free-Font-License") (# "Licen…")) #)
ERROR: In procedure string-ci=?:
In procedure string-ci=: Wrong type argument in position 1 (expecting string): ((string-pat "ISC") (string-pat "LicenseRef-ParaType-Free-Font-License") (string-pat "LicenseRef-DejaVu-fonts"))
--8<---------------cut here---------------end--------------->8---
Cheers,
simon
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#66461: [PATCH] guix: import: opam: Handle list of licenses.
2023-10-11 9:06 bug#66461: importer opam: unsupported type in string-ci=? Simon Tournier
@ 2023-10-15 9:38 ` Josselin Poiret via Bug reports for GNU Guix
2023-10-17 12:56 ` Simon Tournier
0 siblings, 1 reply; 3+ messages in thread
From: Josselin Poiret via Bug reports for GNU Guix @ 2023-10-15 9:38 UTC (permalink / raw)
To: Simon Tournier, 66461; +Cc: Josselin Poiret, Julien Lepiller, pukkamustard
From: Josselin Poiret <dev@jpoiret.xyz>
* guix/import/opam.scm (opam->guix-package): Handle lists of licenses.
---
Hello Simon,
Here's a quick fix.
Best,
Josselin
guix/import/opam.scm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/guix/import/opam.scm b/guix/import/opam.scm
index e67146e593..86e82cde59 100644
--- a/guix/import/opam.scm
+++ b/guix/import/opam.scm
@@ -379,8 +379,10 @@ (define* (opam->guix-package name #:key (repo '("opam")) version #:allow-other-k
(synopsis ,(metadata-ref opam-content "synopsis"))
(description ,(and=> (metadata-ref opam-content "description")
beautify-description))
- (license ,(spdx-string->license
- (metadata-ref opam-content "license"))))
+ (license ,(match (metadata-ref opam-content "license")
+ ((('string-pat strs) ...)
+ `(list ,@(map spdx-string->license strs)))
+ ((? string? str) (spdx-string->license str)))))
(filter
(lambda (name)
(not (member name '("dune" "jbuilder"))))
base-commit: d2923babf3ac44cb6faa88317f77c98f3016820d
--
2.41.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#66461: [PATCH] guix: import: opam: Handle list of licenses.
2023-10-15 9:38 ` bug#66461: [PATCH] guix: import: opam: Handle list of licenses Josselin Poiret via Bug reports for GNU Guix
@ 2023-10-17 12:56 ` Simon Tournier
0 siblings, 0 replies; 3+ messages in thread
From: Simon Tournier @ 2023-10-17 12:56 UTC (permalink / raw)
To: Josselin Poiret; +Cc: 66461-done
Hi Josselin,
Cool, thank you for the quick fix.
On Sun, 15 Oct 2023 at 11:39, Josselin Poiret <dev@jpoiret.xyz> wrote:
> * guix/import/opam.scm (opam->guix-package): Handle lists of licenses.
> ---
> guix/import/opam.scm | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
LGTM. Pushed and closing.
Cheers,
simon
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-17 12:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-11 9:06 bug#66461: importer opam: unsupported type in string-ci=? Simon Tournier
2023-10-15 9:38 ` bug#66461: [PATCH] guix: import: opam: Handle list of licenses Josselin Poiret via Bug reports for GNU Guix
2023-10-17 12:56 ` Simon Tournier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).