unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#58247: Using guix time-machine results in unsupported manifest format error
@ 2022-10-02 11:17 david larsson
  2022-10-02 17:02 ` zimoun
  0 siblings, 1 reply; 7+ messages in thread
From: david larsson @ 2022-10-02 11:17 UTC (permalink / raw)
  To: 58247

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




^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#58247: Using guix time-machine results in unsupported manifest format error
  2022-10-02 11:17 bug#58247: Using guix time-machine results in unsupported manifest format error david larsson
@ 2022-10-02 17:02 ` zimoun
  2022-10-02 18:57   ` david larsson
  0 siblings, 1 reply; 7+ messages in thread
From: zimoun @ 2022-10-02 17:02 UTC (permalink / raw)
  To: david larsson, 58247

Hi,

On dim., 02 oct. 2022 at 13:17, david larsson <david.larsson@selfhosted.xyz> 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 <https://issues.guix.gnu.org/57306>.

What does

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

report?


Cheers,
simon




^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#58247: Using guix time-machine results in unsupported manifest format error
  2022-10-02 17:02 ` zimoun
@ 2022-10-02 18:57   ` david larsson
  2022-10-02 22:10     ` zimoun
  0 siblings, 1 reply; 7+ messages in thread
From: david larsson @ 2022-10-02 18:57 UTC (permalink / raw)
  To: zimoun; +Cc: 58247

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.

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




^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#58247: Using guix time-machine results in unsupported manifest format error
  2022-10-02 18:57   ` david larsson
@ 2022-10-02 22:10     ` zimoun
  2022-10-19 10:51       ` zimoun
  2022-10-20 18:44       ` david larsson
  0 siblings, 2 replies; 7+ messages in thread
From: zimoun @ 2022-10-02 22:10 UTC (permalink / raw)
  To: david larsson; +Cc: 58247

Hi,

On Sun, 02 Oct 2022 at 20:57, david larsson <david.larsson@selfhosted.xyz> 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
>> <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.


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

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


Cheers,
simon




^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#58247: Using guix time-machine results in unsupported manifest format error
  2022-10-02 22:10     ` zimoun
@ 2022-10-19 10:51       ` zimoun
  2022-12-04 17:01         ` Ludovic Courtès
  2022-10-20 18:44       ` david larsson
  1 sibling, 1 reply; 7+ messages in thread
From: zimoun @ 2022-10-19 10:51 UTC (permalink / raw)
  To: david larsson; +Cc: Ludovic Courtès, 58247

Hi,

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


Cheers,
simon




^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#58247: Using guix time-machine results in unsupported manifest format error
  2022-10-02 22:10     ` zimoun
  2022-10-19 10:51       ` zimoun
@ 2022-10-20 18:44       ` david larsson
  1 sibling, 0 replies; 7+ messages in thread
From: david larsson @ 2022-10-20 18:44 UTC (permalink / raw)
  To: zimoun; +Cc: 58247

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






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#58247: Using guix time-machine results in unsupported manifest format error
  2022-10-19 10:51       ` zimoun
@ 2022-12-04 17:01         ` Ludovic Courtès
  0 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2022-12-04 17:01 UTC (permalink / raw)
  To: zimoun; +Cc: david larsson, 58247

Hi,

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

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

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




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-12-04 17:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-02 11:17 bug#58247: Using guix time-machine results in unsupported manifest format error david larsson
2022-10-02 17:02 ` zimoun
2022-10-02 18:57   ` david larsson
2022-10-02 22:10     ` zimoun
2022-10-19 10:51       ` zimoun
2022-12-04 17:01         ` Ludovic Courtès
2022-10-20 18:44       ` david larsson

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).