bug#58247: Using guix time-machine results in unsupported manifest format error

2022-12-04 Thread Ludovic Courtès
Hi,

zimoun  skribis:

> This issue is about the upgrade of manifest version from 3 to 4.  For
> references,
>
> 
>
> On Mon, 03 Oct 2022 at 00:10, zimoun  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:

> 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’.





bug#58247: Using guix time-machine results in unsupported manifest format error

2022-10-20 Thread david larsson

On 2022-10-03 00:10, zimoun wrote:

[..]



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 1oct. 02 2022 18:53:10
  hello 2.10out /gnu/store/xg67cpxq2p6q7wn4y2z194pndwdymhpf-hello-2.10

Generation 2oct. 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







bug#58247: Using guix time-machine results in unsupported manifest format error

2022-10-19 Thread zimoun
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  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’?


Cheers,
simon





bug#58247: Using guix time-machine results in unsupported manifest format error

2022-10-02 Thread zimoun
Hi,

On Sun, 02 Oct 2022 at 20:57, david larsson  
wrote:
> On 2022-10-02 19:02, zimoun wrote:

>> It is probably because an issue with version of manifest; e.g, fixed by
>> 67a6828b2bb821274757f686f7c685b664339a96.  See
>> .
>
> 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.


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

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= -- package -i hello

then I guess it works or not depending on .

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:

--8<---cut here---start->8---
$ guix time-machine --commit=729ce5f -- package -i hello -p /tmp/new

$ cat /tmp/new/manifest | grep -A 1 '(manifest'
(manifest
  (version 4)
--8<---cut here---end--->8---

and

--8<---cut here---start->8---
$ guix time-machine --commit=7e8e070 -- package -i hello -p /tmp/old

$ cat /tmp/old/manifest | grep -A 1 '(manifest'
(manifest
  (version 3)
--8<---cut here---end--->8---


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

--8<---cut here---start->8---
$ guix time-machine --commit=7e8e070 -- package -i hello -p /tmp/new
guix package: error: unsupported manifest format
--8<---cut here---end--->8---

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

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 1oct. 02 2022 18:53:10
  hello 2.10out /gnu/store/xg67cpxq2p6q7wn4y2z194pndwdymhpf-hello-2.10

Generation 2oct. 02 2022 21:25:11   (current)
 + hello2.12.1  out 
/gnu/store/s5pd3rnzymliafb4la5sca63j86xs0y0-hello-2.12.1
 - hello2.10out 
/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.


Cheers,
simon





bug#58247: Using guix time-machine results in unsupported manifest format error

2022-10-02 Thread david larsson

On 2022-10-02 19:02, zimoun wrote:

[..]


It is probably because an issue with version of manifest; e.g, fixed by
67a6828b2bb821274757f686f7c685b664339a96.  See
.


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




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= -- describe but not package -i 


Best regards,
David





bug#58247: Using guix time-machine results in unsupported manifest format error

2022-10-02 Thread zimoun
Hi,

On dim., 02 oct. 2022 at 13:17, david larsson  
wrote:

> 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 
.

What does

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

report?


Cheers,
simon





bug#58247: Using guix time-machine results in unsupported manifest format error

2022-10-02 Thread david larsson

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= -- time-machine 
--commit= -- package -i hello


but it gives the same error.

Any ideas?


Regards,
David