Using guix time-machine results in unsupported manifest format error

  • Done
  • quality assurance status badge
Details
3 participants
  • david larsson
  • Ludovic Courtès
  • zimoun
Owner
unassigned
Submitted by
david larsson
Severity
normal
D
D
david larsson wrote on 2 Oct 2022 13:17
(address . bug-guix@gnu.org)
aa20b99ccc0d92ffc38c814d6942ed0f@selfhosted.xyz
Hi,
Im on commit 729ce5f and Im running: guix time-machine --commit=7e8e070
-- package -i hello

and it outputs:

guix package: error: unsupported manifest format

I have tried nesting time-machine as well like:

guix time-machine --commit=<oldcommit> -- time-machine
--commit=<somecommit> -- package -i hello

but it gives the same error.

Any ideas?


Regards,
David
Z
Z
zimoun wrote on 2 Oct 2022 19:02
87bkquxior.fsf@gmail.com
Hi,

On dim., 02 oct. 2022 at 13:17, david larsson <david.larsson@selfhosted.xyz> wrote:

Toggle quote (7 lines)
> Im on commit 729ce5f and Im running: guix time-machine --commit=7e8e070
> -- package -i hello
>
> and it outputs:
>
> guix package: error: unsupported manifest format

It is probably because an issue with version of manifest; e.g, fixed by
67a6828b2bb821274757f686f7c685b664339a96. See https://issues.guix.gnu.org/57306.

What does

$ cat ~/.guix-profile/manifest | grep -A 1 manifest

report?


Cheers,
simon
D
D
david larsson wrote on 2 Oct 2022 20:57
(name . zimoun)(address . zimon.toutoune@gmail.com)(address . 58247@debbugs.gnu.org)
2b9ab157dfb62c46f8416fc39c320323@selfhosted.xyz
On 2022-10-02 19:02, zimoun wrote:

[..]

Toggle quote (4 lines)
> It is probably because an issue with version of manifest; e.g, fixed by
> 67a6828b2bb821274757f686f7c685b664339a96. See
> <https://issues.guix.gnu.org/57306>.

Note that the commit I'm on, is from 2 days ago, which is after the fix
commit you're mentioning.

Toggle quote (7 lines)
>
> What does
>
> $ cat ~/.guix-profile/manifest | grep -A 1 manifest
>
> report?

(manifest
(version 4)

Not sure it matters, but Im able to run guix time-machine
--commit=<somecommit> -- describe but not package -i <somepackage>

Best regards,
David
Z
Z
zimoun wrote on 3 Oct 2022 00:10
(name . david larsson)(address . david.larsson@selfhosted.xyz)(address . 58247@debbugs.gnu.org)
87v8p1x4fj.fsf@gmail.com
Hi,

On Sun, 02 Oct 2022 at 20:57, david larsson <david.larsson@selfhosted.xyz> wrote:
Toggle quote (9 lines)
> On 2022-10-02 19:02, zimoun wrote:

>> It is probably because an issue with version of manifest; e.g, fixed by
>> 67a6828b2bb821274757f686f7c685b664339a96. See
>> <https://issues.guix.gnu.org/57306>.
>
> Note that the commit I'm on, is from 2 days ago, which is after the fix
> commit you're mentioning.

Yes, note that the earlier mentioned commit
7e8e07033d2a6b0ecef566a05084c534c774cd4a is from Oct 2021 if I read
correctly.


Toggle quote (3 lines)
> Not sure it matters, but Im able to run guix time-machine
> --commit=<somecommit> -- describe but not package -i <somepackage>

IIUC, ’describe’ reads from ~/.config/guix/current/manifest and here the
issue is from ~/.guix-profile/manifest.

Maybe I am wrong, but I think the issue is coming from an
incompatibility about the version of ~/.guix-profile/manifest.

This manifest is at the version 4. When you run

guix time-machine --commit=<commit> -- package -i hello

then I guess it works or not depending on <commit>.

The manifest file ~/.guix-profile/manifest needs to be updated and there
is a conflict because some versions of the profile manifest. For
instance, consider two profiles generated using 2 different revisions of
Guix – a recent one and an old one:

Toggle snippet (7 lines)
$ guix time-machine --commit=729ce5f -- package -i hello -p /tmp/new

$ cat /tmp/new/manifest | grep -A 1 '(manifest'
(manifest
(version 4)

and

Toggle snippet (8 lines)
$ guix time-machine --commit=7e8e070 -- package -i hello -p /tmp/old

$ cat /tmp/old/manifest | grep -A 1 '(manifest'
(manifest
(version 3)


Now, consider the recent profile named /tmp/new and try to install a
previous package from an old commit,

Toggle snippet (4 lines)
$ guix time-machine --commit=7e8e070 -- package -i hello -p /tmp/new
guix package: error: unsupported manifest format

The old Guix uses version 3 and cannot read/write version 4 and bang!

Let try the converse,

Toggle snippet (15 lines)
$ guix time-machine --commit=729ce5f -- package -i hello -p /tmp/old

$ cat /tmp/old/manifest | grep -A 1 '(manifest'
(manifest
(version 4)

$ guix package --list-generations -p /tmp/old
Generation 1 oct. 02 2022 18:53:10
hello 2.10 out /gnu/store/xg67cpxq2p6q7wn4y2z194pndwdymhpf-hello-2.10

Generation 2 oct. 02 2022 21:25:11 (current)
+ hello 2.12.1 out /gnu/store/s5pd3rnzymliafb4la5sca63j86xs0y0-hello-2.12.1
- hello 2.10 out /gnu/store/xg67cpxq2p6q7wn4y2z194pndwdymhpf-hello-2.10

This profile /tmp/old is thus converted from version 3 to version 4, and
then, reusing old version of Guix fails,

Toggle snippet (5 lines)
$ guix time-machine --commit=7e8e070 -- package -i hello -p /tmp/old
guix package: error: unsupported manifest format


Well, I do not know if a fix is possible. The issue is a
backward compatibility issue.


Cheers,
simon
Z
Z
zimoun wrote on 19 Oct 2022 12:51
(name . david larsson)(address . david.larsson@selfhosted.xyz)
86tu40nl1l.fsf@gmail.com
Hi,

This issue is about the upgrade of manifest version from 3 to 4. For
references,


On Mon, 03 Oct 2022 at 00:10, zimoun <zimon.toutoune@gmail.com> wrote:

Toggle quote (3 lines)
> Well, I do not know if a fix is possible. The issue is a
> backward compatibility issue.

Ludo, what is your insight on that matter? Is it fixable? Or do we
mark the issue as ’wontfix’?


Cheers,
simon
D
D
david larsson wrote on 20 Oct 2022 20:44
(name . zimoun)(address . zimon.toutoune@gmail.com)(address . 58247@debbugs.gnu.org)
e2594aa19c0c0bda6aec06406b9dd51e@selfhosted.xyz
On 2022-10-03 00:10, zimoun wrote:

[..]

Toggle quote (35 lines)
>
> Let try the converse,
>
> --8<---------------cut here---------------start------------->8---
> $ guix time-machine --commit=729ce5f -- package -i hello -p /tmp/old
>
> $ cat /tmp/old/manifest | grep -A 1 '(manifest'
> (manifest
> (version 4)
>
> $ guix package --list-generations -p /tmp/old
> Generation 1 oct. 02 2022 18:53:10
> hello 2.10 out /gnu/store/xg67cpxq2p6q7wn4y2z194pndwdymhpf-hello-2.10
>
> Generation 2 oct. 02 2022 21:25:11 (current)
> +
> hello 2.12.1 out /gnu/store/s5pd3rnzymliafb4la5sca63j86xs0y0-hello-2.12.1
> - hello 2.10
> out /gnu/store/xg67cpxq2p6q7wn4y2z194pndwdymhpf-hello-2.10
> --8<---------------cut here---------------end--------------->8---
>
> This profile /tmp/old is thus converted from version 3 to version 4,
> and
> then, reusing old version of Guix fails,
>
> --8<---------------cut here---------------start------------->8---
> $ guix time-machine --commit=7e8e070 -- package -i hello -p /tmp/old
> guix package: error: unsupported manifest format
> --8<---------------cut here---------------end--------------->8---
>
>
> Well, I do not know if a fix is possible. The issue is a
> backward compatibility issue.
>

Hi,
Thanks for the clarification.

I imagine it would be possible to give it a dirty fix, approximately as
you just showed with /tmp/old, if you also just readd the default
profile's currently installed packages to it at the end. So, if using
~/.guix-profile, it would be something like:

1. Say your ~/.guix-profile is at commit=XYZ
2. build a NEW profile with the old package ONLY, from commit=ABC (as in
/tmp/old)
3. guix pull /tmp/old "back" to commit=XYZ
4. install remaining packages that was in your ~/.guix-profile to
/tmp/old.
5. mv the ~/.guix-profile symlink to /tmp/old.

( /tmp/old should just be in /var/guix/profiles/per-user/$USER as normal
)

Building a new package generation like this would not be the same as
usual, cuz the currently installed packages may come from different guix
revisions. That might be a dealbreaker for fixing it. I do think it's
very sad though, that the time-machine is kind of broken whenever the
manifest gets a new version, with no hint even to the user how to find a
solution.

Best regards,
David
L
L
Ludovic Courtès wrote on 4 Dec 2022 18:01
(name . zimoun)(address . zimon.toutoune@gmail.com)
87cz8zm7b5.fsf@gnu.org
Hi,

zimoun <zimon.toutoune@gmail.com> skribis:

Toggle quote (13 lines)
> This issue is about the upgrade of manifest version from 3 to 4. For
> references,
>
> <http://issues.guix.gnu.org/issue/58247>
>
> On Mon, 03 Oct 2022 at 00:10, zimoun <zimon.toutoune@gmail.com> wrote:
>
>> Well, I do not know if a fix is possible. The issue is a
>> backward compatibility issue.
>
> Ludo, what is your insight on that matter? Is it fixable? Or do we
> mark the issue as ’wontfix’?

David wrote:

Toggle quote (7 lines)
> Im on commit 729ce5f and Im running: guix time-machine
> --commit=7e8e070 -- package -i hello
>
> and it outputs:
>
> guix package: error: unsupported manifest format

This use case cannot be fixed: you cannot use an old Guix (one that only
understood manifest version 3) to manipulate a “new” profile (manifest
version 4). That’s a fundamental limitation of old software being
unable to deal with new formats in general.

One way to work around it is to have that old ‘guix’ operate on a fresh
profile (thus it’ll be version 3):

rm -f /tmp/old-stuff
guix time-machine --commit=7e8e070 -- package -i hello -p /tmp/old-stuff

or, better yet, to use ‘guix shell’ or ‘guix environment’:

guix time-machine --commit=7e8e070 -- \
environment --ad-hoc hello -- hello

I’m closing this bug.

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 4 Dec 2022 18:02
control message for bug #58247
(address . control@debbugs.gnu.org)
87bkojm7am.fsf@gnu.org
tags 58247 wontfix
close 58247
quit
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 58247
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