Subject: bug#44735: gilbc of the running system got wiped while building a package, system broken

From: Ludovic Courtès <[email-masked]>
Date: Fri, 20 Nov 2020 12:31:56 +0100

Hi Stefan,

Stefan <[email-masked]> skribis:

> I found the root cause of this issue: I made a typo and inadvertently did a “./configure --localstatedir=/vaar”.

Ouch.  :-/

Your store database may no longer be in sync with your actual store so
you may have to reinstall.  You can try ‘guix gc --verify’ to get an
idea of how bad the situation is.

> The manual should warn that using a wrong (or omitted) --localstatedir may destroy the guix installation and possibly the whole guix system.
>
> What can be done to prevent that a simple mistake like this destroys a system?

./configure warns or errors out and the manual warns in a couple of
places too, but evidently it remains too easy to shoot oneself in the
foot.

Could you check ‘config.log’ to see what ‘configure’ said?  You can see
the source of this check at the bottom of ‘m4/guix.m4’.

Also, why did you run guix-daemon from your checkout?  This is only
necessary if you’re actually hacking on the daemon, but perhaps the
manual is misleading.  (Hadn’t you run guix-daemon from the checkout,
the problem would not have occurred, even with a wrong
‘--localstatedir’.)

Thanks,
Ludo’.