all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: "Wiktor Żelazny" <wz@freeshell.de>
Cc: help-guix@gnu.org
Subject: Re: ./pre-inst-env guix build dangerous inside an environment?
Date: Wed, 11 Sep 2019 21:40:45 +0200	[thread overview]
Message-ID: <87tv9ipqo2.fsf@elephly.net> (raw)
In-Reply-To: <20190911161800.g6lzpfmfttsxgxmf@wz.localdomain>


Hi Wiktor,

> On Tue, Sep 10, 2019 at 04:37:03PM +0200, Ricardo Wurmus wrote:
>
>> This sounds like perhaps you ran “./configure” without
>> “--localstatedir=/var”, so that Guix would be using a different
>> location for its database and thus consider existing stuff in /gnu to
>> be invalid.
>
> Thank you for your prompt reply, Ricardo.
>
> Yeah, that’s precisely what happened. I missed (or just lazily,
> hastily ignored) the “Make sure to pass --localstatedir=directory”
> sentence. I’m glad there exists at least an explanation for that
> disaster.
>
> Don’t you think it would be reasonable to follow that sentence with
> something like: *Otherwise, you risk that the default store in `/gnu`
> becomes damaged*?

I think this failure mode is pretty terrible and I’m really sorry that
you encountered it.  I think it’s not a good idea for Guix to delete
stuff from /gnu/store just because the database says that the
directories are invalid.

I also suffered from this problem in the big production environment at
the institute where I work — luckily Guix failed to delete things early
due to a permission problem, so I didn’t lose all of /gnu.

I wonder if the daemon should just abort with an error when it
encounters an unknown directory.  The problem with that is that
sometimes directories are left behind when the daemon was forcibly
killed, and we want those to be cleaned up automatically.

@Ludo, what do you think about this?

>> This is not a problem with using an environment.
>
> Still, it seems to me unclear from the manual (at least as far as
> 14.2 is concerned) whether anything is gained by doing test builds in
> an environment, and thus whether this is the recommended way, and if
> so—for which steps.

Using a git checkout and an environment is the recommended way to
contribute to Guix, because you’ll have access to the most current
version of Guix.  Building with “./pre-inst-env guix build” lets Guix
use the (potentially modified) source checkout, so you have access to
work-in-progress package definitions before they are added to Guix
proper.  Once the build is successful you can submit a patch and the
package would eventually become part of Guix.

Without a git checkout (and an environment to provide the required
dependencies to work with it) you’d have a hard time contributing to
Guix.

--
Ricardo

  reply	other threads:[~2019-09-11 19:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-10 13:58 ./pre-inst-env guix build dangerous inside an environment? Wiktor Żelazny
2019-09-10 14:37 ` Ricardo Wurmus
2019-09-11 16:18   ` Wiktor Żelazny
2019-09-11 19:40     ` Ricardo Wurmus [this message]
2019-09-12 15:45       ` Wiktor Żelazny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tv9ipqo2.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=help-guix@gnu.org \
    --cc=wz@freeshell.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.