GNU bug report logs - #37928
Better handle license expressions in 'guix import crate'

Previous Next

Package: guix-patches;

Reported by: Brice Waegeneire <brice <at> waegenei.re>

Date: Fri, 25 Oct 2019 20:28:02 UTC

Severity: normal

Tags: patch

Merged with 37927

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #21 received at 37928-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Brice Waegeneire <brice <at> waegenei.re>
Cc: 37927-done <at> debbugs.gnu.org, 37928-done <at> debbugs.gnu.org
Subject: Re: [bug#37928] [PATCH v2] import: crate: Better handle license
 expressions.
Date: Wed, 11 Dec 2019 12:24:04 +0100
Hi Brice,

Brice Waegeneire <brice <at> waegenei.re> skribis:

> * guix/import/crate.scm (%dual-license-rx): Removed function.
> (crate->guix-package): Handle most of the multi-licensing cases.
> * tests/crate.scm (licenses): Add tests for some licenses.

Thanks for the updated patch!

> +(define (string->license string)
> +    (map
> +     spdx-string->license
> +     (filter (lambda (license)
> +               (and (not (string-null? license))
> +                   (not (any (lambda (elem) (string=? elem license))
> +                             '("AND" "OR" "WITH")))))
> +            (string-split string (string->char-set " /")))))

I changed that to use ‘filter-map’ instead and pushed as
263a267b75e472cb84428571580dabd99d5dff0c.

Thanks!

Ludo’.




This bug report was last modified 5 years and 165 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.