GNU bug report logs -
#49627
[PATCH] import/print: package->code: Fix license object.
Previous Next
Reported by: itd <itd <at> net.in.tum.de>
Date: Sun, 18 Jul 2021 23:16:01 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 49627 in the body.
You can then email your comments to 49627 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#49627
; Package
guix-patches
.
(Sun, 18 Jul 2021 23:16:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
itd <itd <at> net.in.tum.de>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sun, 18 Jul 2021 23:16:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* guix/import/print.scm (package->code)<license->code>: Update generated
licence object to match record constructor.
---
Hi,
given the following example (please note the fake license):
```bash
(
printf '%s\n'\
"(define-module (out) #:use-module (guix packages) #:use-module (guix download))"\
"(define license (@@ (guix licenses) license))" # see commit 1597613488
guix import json /dev/stdin <<EOF
{
"name": "hello",
"version": "2.10",
"source": "mirror://gnu/hello/hello-2.10.tar.gz",
"build-system": "gnu",
"home-page": "https://www.gnu.org/software/hello/",
"synopsis": "Hello, GNU world: An example GNU package",
"description": "GNU Hello prints a greeting.",
"license": "a-license",
"native-inputs": ["gettext"]
}
EOF
) > out.scm
guix build -L . hello
```
This example fails to build for me with error:
```bash
guix build: warning: failed to load '(out)':
Wrong type to apply: "hello"
```
I suspect this to be caused by the generated license definition:
```guile
(license
(license
(name "FSDG-compatible")
(uri "a-license")
(comment "")))))
```
After patching, the package builds successfully with the following
license definition:
```guile
(license
(license "FSDG-compatible" "a-license" ""))))
```
Regards
itd
guix/import/print.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/guix/import/print.scm b/guix/import/print.scm
index dcc38abc70..0310739b3a 100644
--- a/guix/import/print.scm
+++ b/guix/import/print.scm
@@ -60,9 +60,9 @@ when evaluated."
(if var
(symbol-append 'license: var)
`(license
- (name ,(license-name lic))
- (uri ,(license-uri lic))
- (comment ,(license-comment lic))))))
+ ,(license-name lic)
+ ,(license-uri lic)
+ ,(license-comment lic)))))
(define (search-path-specification->code spec)
`(search-path-specification
--
2.30.2
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Mon, 19 Jul 2021 14:59:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
itd <itd <at> net.in.tum.de>
:
bug acknowledged by developer.
(Mon, 19 Jul 2021 14:59:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 49627-done <at> debbugs.gnu.org (full text, mbox):
Hi,
itd <itd <at> net.in.tum.de> skribis:
> * guix/import/print.scm (package->code)<license->code>: Update generated
> licence object to match record constructor.
Applied, thanks!
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 17 Aug 2021 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 252 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.