Subject: bug#34281: guix pull - maybe a bug

From: Ludovic Courtès <[email-masked]>
Date: Mon, 04 Feb 2019 22:30:06 +0100

Hello,

Thibaut Brandscheid <[email-masked]> skribis:

> I use openSUSE Tumbleweed and got n the last days a faulty update. This
> happens maybe ones or twice a year. So I did what I always do, I revert the
> non-user file system to an older btrfs snapshot. The thing is, that guix
> pull does no longer work after the system rollback.

[...]

> ./guix/store.scm:982:9: Throw to key `srfi-34' with args `(#<condition &store-protocol-error [message: "opening file `/gnu/store/vncqqf1nzbbc4hkaib5mkpzr4vn61qdl-guile-git-0.2.0.drv': No such file or directory" status: 1] 5549720>)'.

By reverting to an earlier Btrfs snapshot, you ended up with a corrupt
store.  The store actually consists of two things: the files under
/gnu/store, and the /var/guix/db/db.sqlite database that contains
metadata about those files.  Presumably, after you reverted to an
earlier snapshot, those two bits got out of sync, leading to the error
above.

At this point you may have to reinstall Guix.  The take-away is that you
should never rely on file-system-level rollbacks for Guix; instead use
the mechanisms that Guix provides, such as ‘--roll-back’.

Thanks,
Ludo’.