GNU bug report logs - #48486
[PATCH] import: hackage: Prefix licenses with

Previous Next

Package: guix-patches;

Reported by: Xinglu Chen <public <at> yoctocell.xyz>

Date: Mon, 17 May 2021 20:12:02 UTC

Severity: normal

Tags: patch

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 48486 in the body.
You can then email your comments to 48486 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#48486; Package guix-patches. (Mon, 17 May 2021 20:12:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Xinglu Chen <public <at> yoctocell.xyz>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 17 May 2021 20:12:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Xinglu Chen <public <at> yoctocell.xyz>
To: guix-patches <at> gnu.org
Subject: [PATCH] import: hackage: Prefix licenses with
Date: Mon, 17 May 2021 22:11:15 +0200
* guix/import/hackage.scm (string->license): Prefix the value of the license
field with ‘license:’.
* tests/hackage.scm (match-ghc-foo, match-ghc-foo-6, match-ghc-foo-revision):
Adjust accordingly.
---
 guix/import/hackage.scm | 27 ++++++++++++++-------------
 tests/hackage.scm       |  7 ++++---
 2 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm
index 9f992ffe8e..f94a1e7087 100644
--- a/guix/import/hackage.scm
+++ b/guix/import/hackage.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2016 Nikita <nikita <at> n0.is>
 ;;; Copyright © 2018 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2019 Robert Vollmert <rob <at> vllmrt.net>
+;;; Copyright © 2021 Xinglu Chen <public <at> yoctocell.xyz>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -163,22 +164,22 @@ version."
   ;; https://www.haskell.org
   ;; /cabal/release/cabal-latest/doc/API/Cabal/Distribution-License.html.
   (match-lambda
-   ("GPL-2" 'gpl2)
-   ("GPL-3" 'gpl3)
+   ("GPL-2" 'license:gpl2)
+   ("GPL-3" 'license:gpl3)
    ("GPL" "'gpl??")
-   ("AGPL-3" 'agpl3)
+   ("AGPL-3" 'license:agpl3)
    ("AGPL" "'agpl??")
-   ("LGPL-2.1" 'lgpl2.1)
-   ("LGPL-3" 'lgpl3)
+   ("LGPL-2.1" 'license:lgpl2.1)
+   ("LGPL-3" 'license:lgpl3)
    ("LGPL" "'lgpl??")
-   ("BSD2" 'bsd-2)
-   ("BSD3" 'bsd-3)
-   ("BSD-3-Clause" 'bsd-3)
-   ("MIT" 'expat)
-   ("ISC" 'isc)
-   ("MPL" 'mpl2.0)
-   ("Apache-2.0" 'asl2.0)
-   ("PublicDomain" 'public-domain)
+   ("BSD2" 'license:bsd-2)
+   ("BSD3" 'license:bsd-3)
+   ("BSD-3-Clause" 'license:bsd-3)
+   ("MIT" 'license:expat)
+   ("ISC" 'license:isc)
+   ("MPL" 'license:mpl2.0)
+   ("Apache-2.0" 'license:asl2.0)
+   ("PublicDomain" 'license:public-domain)
    ((x) (string->license x))
    ((lst ...) `(list ,@(map string->license lst)))
    (_ #f)))
diff --git a/tests/hackage.scm b/tests/hackage.scm
index 77e333cbfc..66a13d9881 100644
--- a/tests/hackage.scm
+++ b/tests/hackage.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Federico Beffa <beffa <at> fbengineering.ch>
 ;;; Copyright © 2019 Robert Vollmert <rob <at> vllmrt.net>
+;;; Copyright © 2021 Xinglu Chen <public <at> yoctocell.xyz>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -183,7 +184,7 @@ library
     ('home-page "http://test.org")
     ('synopsis (? string?))
     ('description (? string?))
-    ('license 'bsd-3)))
+    ('license 'license:bsd-3)))
 
 (define* (eval-test-with-cabal test-cabal matcher #:key (cabal-environment '()))
   (define port (open-input-string test-cabal))
@@ -232,7 +233,7 @@ library
     ('home-page "http://test.org")
     ('synopsis (? string?))
     ('description (? string?))
-    ('license 'bsd-3)))
+    ('license 'license:bsd-3)))
 
 (test-assert "hackage->guix-package test 6"
   (eval-test-with-cabal test-cabal-6 match-ghc-foo-6))
@@ -362,7 +363,7 @@ executable cabal
     ('home-page "http://test.org")
     ('synopsis (? string?))
     ('description (? string?))
-    ('license 'bsd-3)))
+    ('license 'license:bsd-3)))
 
 (test-assert "hackage->guix-package test cabal revision"
   (eval-test-with-cabal test-cabal-revision match-ghc-foo-revision))

base-commit: 938ffcbb0589adc07dc12c79eda3e1e2bb9e7cf8
-- 
2.31.1





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Sat, 22 May 2021 21:39:02 GMT) Full text and rfc822 format available.

Notification sent to Xinglu Chen <public <at> yoctocell.xyz>:
bug acknowledged by developer. (Sat, 22 May 2021 21:39:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Xinglu Chen <public <at> yoctocell.xyz>
Cc: 48486-done <at> debbugs.gnu.org
Subject: Re: bug#48486: [PATCH] import: hackage: Prefix licenses with
Date: Sat, 22 May 2021 23:38:42 +0200
Hi,

Xinglu Chen <public <at> yoctocell.xyz> skribis:

> * guix/import/hackage.scm (string->license): Prefix the value of the license
> field with ‘license:’.
> * tests/hackage.scm (match-ghc-foo, match-ghc-foo-6, match-ghc-foo-revision):
> Adjust accordingly.

Applied, thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 20 Jun 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 281 days ago.

Previous Next


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