Subject: Re: bug#56441: Time travel doesn't resist profile format changes

From: zimoun <[email-masked]>
Date: Fri, 08 Jul 2022 16:34:06 +0200

Hi,

On ven., 08 juil. 2022 at 12:36, Ludovic Courtès <[email-masked]> wrote:
> Hi,
>
> Ludovic Courtès <[email-masked]> skribis:
>
>> 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’.
>
> The patches below do that.  As discussed on IRC, it’s not pretty but
> it’s pragmatic.
>
> Tested with:
>
>   ./pre-inst-env guix time-machine \
>     --commit=85a5110de79f4fe9fd822ede3915654ee699d6c5 -- describe
>
> How does that sound?

It sounds good!  Here a check from v1.3 to v0.16.

--8<---------------cut here---------------start------------->8---
$ for ci in a0178d34f582b50e9bdbb0403943129ae5b560ff   \
              a099685659b4bfa6b3218f84953cbb7ff9e88063 \
              d62c9b2671be55ae0305bebfda17b595f33797f2 \
              d68de958b60426798ed62797ff7c96c327a672ac \
              6298c3ffd9654d3231a6f25390b056483e8f407c \
              4a0b87f0ec5b6c2dcf82b372dd20ca7ea6acdd9c;
do
    ./pre-inst-env guix time-machine --commit=$ci -- describe
done

  guix a0178d3
    repository URL: https://git.savannah.gnu.org/git/guix.git
    commit: a0178d34f582b50e9bdbb0403943129ae5b560ff
  guix a099685
    repository URL: https://git.savannah.gnu.org/git/guix.git
    commit: a099685659b4bfa6b3218f84953cbb7ff9e88063
guile: warning: failed to install locale
  guix d62c9b2
    repository URL: https://git.savannah.gnu.org/git/guix.git
    commit: d62c9b2671be55ae0305bebfda17b595f33797f2
guile: warning: failed to install locale
  guix d68de95
    repository URL: https://git.savannah.gnu.org/git/guix.git
    commit: d68de958b60426798ed62797ff7c96c327a672ac
guile: warning: failed to install locale
  guix 6298c3f
    repository URL: https://git.savannah.gnu.org/git/guix.git
    commit: 6298c3ffd9654d3231a6f25390b056483e8f407c
guile: warning: failed to install locale
hint: Consider installing the `glibc-utf8-locales' or `glibc-locales' package and defining `GUIX_LOCPATH', along these
lines:

     guix package -i glibc-utf8-locales
     export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"

See the "Application Setup" section in the manual, for more info.

  guix 4a0b87f
    repository URL: https://git.savannah.gnu.org/git/guix.git
    commit: 4a0b87f0ec5b6c2dcf82b372dd20ca7ea6acdd9c
--8<---------------cut here---------------end--------------->8---

Cheers,
simon