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

From: Ludovic Courtès <[email-masked]>
Date: Fri, 08 Jul 2022 10:52:43 +0200

Hi,

Ricardo Wurmus <[email-masked]> skribis:

> It’s worse than that: an older Guix living in a new profile (i.e a
> profile with a version 4 manifest) cannot describe itself, because it
> cannot read the manifest.

Argh.

[...]

> This old Guix lives in a new profile.  We must prevent this.  But how?
>
> How about this:
>
> Build Guix with only the 'guix channel (no any other custom channels
> allowed), and then build the channel’s profile (with all requested
> channels) inside an inferior of that plain Guix.  Since the inferior
> Guix can only build profiles that it supports the resulting *profile*
> will be compatible with the same Guix (and any additional channels).

Another option (thinking out loud):

  • in ‘package-cache-file’, unconditionally generate a v3 profile (we
    could add a ‘version’ field to <profile> etc.);

  • likewise in ‘channel-instances->derivation’.

Problem: it doesn’t address the case where you install the ‘guix’
package in a regular profile (I think?).

Other option: run the whole ‘profile-derivation’ call of
‘channel-instances->derivation’ in the inferior, instead of just
‘package-cache-file’.

Needs more thought…

Ludo’.