Subject: Re: bug#59598: "Unsupported manifest format" error

From: [email-masked]
Date: Mon, 28 Nov 2022 00:34:43 +0100

Hi zimoun,

On +2022-11-27 13:22:22 +0100, zimoun wrote:
[...]
> 
> This file lives in the store.  Hum, I am surprised that a power shutdown
> removed this file.
>

Are all the conditions for a clean sync
of the file system where /gnu/store is mounted guaranteed?

What is the difference between power shutdown when you let
the battery run down and the OS shuts everything down
vs if you log out and click power down?

Is it not possible that when you have recharged the battery
and boot up that a journaling file system will discover traces
of an incomplete transaction (i.e. the one that was supposed
to record and  atomically commit the missing file) and discards
it to reestabllish coherent file system state?

And what about continuations that were possibly waiting for
availability of that file?

Hopefully the OS will recover a good state, but what can
userland innocents expect to be guaranteed, in terms of
work flow they can understand?

(those with the grok-fu to understand internals won't need
much to imagine failure scenarios, but will presumably
appreciate /design/rationale/implementation/ documentation tips)

> Well, I do not know if you can recover this empty file.  At least, you
> can the previous generation; e.g., guix package --roll-back.
>

Assuming the file system recovered -- a pretty good bet, but ... :)

> Or you can extract a previous manifest with,
> 
>   guix package -p /var/guix/profiles/per-user/<USER>/guix-profile-<NUMBER>-link \
>        --export-manifest > /tmp/manifest-<NUMBER>.scm
> 
> where <USER> and <NUMBER> depends on.  Then,
> 
>   guix package -m /tmp/manifest-<NUMBER>scm
> 
> will reinstall the same list of packages but at their current version
> (the ones of current Guix revision; guix describe).
>

> Cheers,
> simon
--
Regards,
Bengt Richter