GNU bug report logs - #61255
[PATCH 0/5] Add support for the RPM format to "guix pack"

Previous Next

Package: guix-patches;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Fri, 3 Feb 2023 16:20:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>, Tobias Geerinckx-Rice <me <at> tobias.gr>, Simon Tournier <zimon.toutoune <at> gmail.com>, Mathieu Othacehe <othacehe <at> gnu.org>, Christopher Baines <mail <at> cbaines.net>, Ricardo Wurmus <rekado <at> elephly.net>, 61255 <at> debbugs.gnu.org
Subject: [bug#61255] [PATCH 2/5] gexp: computed-file: Honor %guile-for-build.
Date: Fri, 03 Feb 2023 22:43:17 -0500
Hi Luvodic,

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

> Hello!
>
> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:
>
>> * guix/gexp.scm (computed-file): Set the default value of the #:guile argument
>> to that of the %guile-for-build parameter.
>
> [...]
>
>>  (define* (computed-file name gexp
>> -                        #:key guile (local-build? #t) (options '()))
>> +                        #:key (guile (%guile-for-build))
>> +                        (local-build? #t) (options '()))
>
> I think that would lead ‘computed-file’ to pick (%guile-for-build) at
> the wrong time (time of call instead of time of lowering).
>
> Commit ab25eb7caaf5571cc9f8d6397a1eae127d7e29d1 made it #f such that
> ‘gexp->derivation’ gets to resolve it at the “right” time.

I see!  I think you are right.  Would making the change in the
associated gexp compiler do the right thing?  Currently it ignores the
%guile-for-build fluid as set in the tests/pack.scm test suite for
example.  Something like this:

--8<---------------cut here---------------start------------->8---
modified   guix/gexp.scm
@@ -584,7 +584,7 @@ (define-record-type <computed-file>
   (options    computed-file-options))             ;list of arguments
 
 (define* (computed-file name gexp
-                        #:key (guile (%guile-for-build))
+                        #:key guile
                         (local-build? #t) (options '()))
   "Return an object representing the store item NAME, a file or directory
 computed by GEXP.  When LOCAL-BUILD? is #t (the default), it ensures the
@@ -601,7 +601,8 @@ (define-gexp-compiler (computed-file-compiler (file <computed-file>)
   ;; gexp.
   (match file
     (($ <computed-file> name gexp guile options)
-     (mlet %store-monad ((guile (lower-object (or guile (default-guile))
+     (mlet %store-monad ((guile (lower-object (or guile (%guile-for-build)
+                                                  (default-guile))
                                               system #:target #f)))
        (apply gexp->derivation name gexp #:guile-for-build guile
               #:system system #:target target options)))))
--8<---------------cut here---------------end--------------->8---

I've verified that 'make check TESTS=tests/pack.scm' is still happy
(without such patch, with patch 3/5 applied, the
"self-contained-tarball" would try to build a non-bootstrap guile and
timeout (on my old machine).

Thanks and enjoy FOSDEM!

-- 
Maxim




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

Previous Next


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