Fix guile2.2-gdbm-ffi

  • Done
  • quality assurance status badge
Details
2 participants
  • Christopher Allan Webber
  • Ludovic Courtès
Owner
unassigned
Submitted by
Christopher Allan Webber
Severity
normal

Debbugs page

Christopher Allan Webber wrote 8 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)
871sv165yp.fsf@dustycloud.org

Christopher Allan Webber writes:

Toggle quote (3 lines)
> Anyway, okay to push? I'd love to have the buggy package not be buggy
> in master. :)

Meh, I STILL made a mistake! I forgot to have a couple of imports
included. But I've tested the package and now it works.

New patch attached!
From 052ab44ac7eda04c11e04d03620e03872cc1e84a Mon Sep 17 00:00:00 2001
From: Christopher Allan Webber <cwebber@dustycloud.org>
Date: Fri, 10 Feb 2017 19:24:57 -0600
Subject: [PATCH] guile-gdbm-ffi: Write to correct guile output directory and
use guild.

* gnu/packages/guile.scm (guile-gdbm-ffi): Check guile for effective version
before writing to output path. Also fixes a bug where the guild command was
not getting called, and instead was calling the internal guile compile-file
procedure. This meant that the package produced was dependent on whatever
version of guile was powering Guix at the time. Also set GUILE_AUTO_COMPILE
to 0 to avoid gnarly looking warnings during build.
---
gnu/packages/guile.scm | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)

Toggle diff (52 lines)
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 52b92453f..b31262664 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -846,10 +846,21 @@ inspired by the SCSH regular expression system.")
#:builder
(begin
(use-modules (guix build utils)
- (system base compile))
+ (ice-9 rdelim)
+ (ice-9 popen))
+
+ (setenv "GUILE_AUTO_COMPILE" "0")
(let* ((out (assoc-ref %outputs "out"))
- (module-dir (string-append out "/share/guile/site/2.0"))
+ (effective-version
+ (read-line
+ (open-pipe* OPEN_READ
+ (string-append
+ (assoc-ref %build-inputs "guile")
+ "/bin/guile")
+ "-c" "(display (effective-version))")))
+ (module-dir (string-append out "/share/guile/site/"
+ effective-version))
(source (assoc-ref %build-inputs "source"))
(doc (string-append out "/share/doc"))
(guild (string-append (assoc-ref %build-inputs "guile")
@@ -857,7 +868,10 @@ inspired by the SCSH regular expression system.")
(gdbm.scm-dest
(string-append module-dir "/gdbm.scm"))
(gdbm.go-dest
- (string-append module-dir "/gdbm.go")))
+ (string-append module-dir "/gdbm.go"))
+ (compile-file
+ (lambda (in-file out-file)
+ (system* guild "compile" "-o" out-file in-file))))
;; Make installation directories.
(mkdir-p module-dir)
(mkdir-p doc)
@@ -875,8 +889,7 @@ inspired by the SCSH regular expression system.")
(assoc-ref %build-inputs "gdbm"))))
;; compile to the destination
- (compile-file gdbm.scm-dest
- #:output-file gdbm.go-dest)))))
+ (compile-file gdbm.scm-dest gdbm.go-dest)))))
(inputs
`(("guile" ,guile-2.0)))
(propagated-inputs
--
2.11.0
Ludovic Courtès wrote 8 years ago
(name . Christopher Allan Webber)(address . cwebber@dustycloud.org)
8760kdyya7.fsf@gnu.org
Hi Chris!

Christopher Allan Webber <cwebber@dustycloud.org> skribis:

Toggle quote (25 lines)
>
> Christopher Allan Webber writes:
>
>> Anyway, okay to push? I'd love to have the buggy package not be buggy
>> in master. :)
>
> Meh, I STILL made a mistake! I forgot to have a couple of imports
> included. But I've tested the package and now it works.
>
> New patch attached!
>
> From 052ab44ac7eda04c11e04d03620e03872cc1e84a Mon Sep 17 00:00:00 2001
> From: Christopher Allan Webber <cwebber@dustycloud.org>
> Date: Fri, 10 Feb 2017 19:24:57 -0600
> Subject: [PATCH] guile-gdbm-ffi: Write to correct guile output directory and
> use guild.
>
> * gnu/packages/guile.scm (guile-gdbm-ffi): Check guile for effective version
> before writing to output path. Also fixes a bug where the guild command was
> not getting called, and instead was calling the internal guile compile-file
> procedure. This meant that the package produced was dependent on whatever
> version of guile was powering Guix at the time. Also set GUILE_AUTO_COMPILE
> to 0 to avoid gnarly looking warnings during build.

[...]

Toggle quote (2 lines)
> + (setenv "GUILE_AUTO_COMPILE" "0")

Maybe add a comment like “Avoid warnings” here.

Otherwise LGTM, thanks for taking care of it!

Ludo’.
Christopher Allan Webber wrote 8 years ago
control message for bug #25711
(address . control@debbugs.gnu.org)
87y3x84yq7.fsf@dustycloud.org
close 25711
?
Your comment

This issue is archived.

To comment on this conversation send an email to 25711@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 25711
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help