bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#56441: guix time-machine broken by profiles speed-up


From: Ludovic Courtès
Subject: bug#56441: guix time-machine broken by profiles speed-up
Date: Fri, 08 Jul 2022 22:42:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)

Ricardo Wurmus <rekado@elephly.net> skribis:

> Attached is a patch that attempts to build the manifest in an inferior.
> This fails because manifest->gexp returns a gexp that we can’t get out
> of the inferior to pass to build-profile.

Thanks for sharing!  This sounded like the “right” approach, but there’s
a part that made me feel uneasy about it:

> +    (define (manifest-gexp)
> +      (pk 'man-gexp
> +          (if inferior-guix
> +              (let* ((inferior (open-inferior inferior-guix))
> +                     (result
> +                      ;; TODO: this doesn't work because we can't lift the
> +                      ;; gexp out of the inferior.
> +                      (inferior-eval `(begin
> +                                        (use-modules (guix profiles)
> +                                                     (guix derivations))
> +                                        ((@@ (guix profiles) manifest->gexp)
> +                                         (manifest
> +                                          (list
> +                                           ,@(map (lambda (entry)
> +                                                    `(manifest-entry
> +                                                       (name 
> ,(manifest-entry-name entry))
> +                                                       (version 
> ,(manifest-entry-version entry))
> +                                                       (output 
> ,(manifest-entry-output entry))
> +                                                       (item 
> (read-derivation-from-file
> +                                                              
> ,(derivation-file-name
> +                                                                
> (manifest-entry-item entry))))))
> +                                                  (manifest-entries 
> manifest))))))

Here we have to rely on a larger part of the API: a subset of (guix
profiles) and (guix derivations).

Conversely, in (guix channels), the only assumption made about the API
implemented by the other Guix (which might be older or might be newer)
is the ‘generate-package-cache’ procedure.  It’s a small requirement, so
potentially easier to satisfy in future versions for a long time.


When dealing with these time travel issues, I feel we have difficult
choices to make.  It’s a bit of an unusual requirement that we have.

Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]