Subject: bug#37927: closed (Re: [bug#37928] [PATCH v2] import: crate: Better handle license expressions.)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 11 Dec 2019 13:02:03 +0000

Your bug report

#37927: Better handle license expressions in 'guix import crate'

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
37927: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=37927
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#37928] [PATCH v2] import: crate: Better handle license expressions.
From: Ludovic Courtès <[email-masked]>
To: Brice Waegeneire <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Wed, 11 Dec 2019 12:24:04 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Brice,

Brice Waegeneire <[email-masked]> 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’.

From: Brice Waegeneire <[email-masked]>
To: [email-masked]
Date: Fri, 25 Oct 2019 22:27:12 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

This patch should allow correctly importing most of the licenses from
crates.io. Before it, importing recursively ripgrep would result in ~140
missing licenses; now none seems missing.