From: ludo@gnu.org (Ludovic Courtès)
To: Chris Marusich <cmmarusich@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: 'guix build' and garbage collection
Date: Sun, 02 Apr 2017 11:30:41 +0200 [thread overview]
Message-ID: <87inmnb1ha.fsf@gnu.org> (raw)
In-Reply-To: <878tnjk489.fsf@gmail.com> (Chris Marusich's message of "Sat, 01 Apr 2017 18:06:30 -0700")
Hi Chris,
Chris Marusich <cmmarusich@gmail.com> skribis:
> I saw this in guix/scripts.build.scm:
>
> (and (build-derivations store drv mode)
> (for-each show-derivation-outputs drv)
> (for-each (cut register-root store <> <>)
> (map (lambda (drv)
> (map cdr
> (derivation->output-paths drv)))
> drv)
> roots))
>
> Here, we build the derivations, and then we add indirect GC roots. My
> question is: what guarantee is there that the output paths will not be
> garbage collected after we build the derivations but before we add the
> indirect GC roots?
For the duration of the connection to the build daemon, build results
are registered as GC roots, so we’re fine.
You can see it in the ‘DerivationGoal’ constructor in libstore/build.cc:
/* Prevent the .chroot directory from being
garbage-collected. (See isActiveTempFile() in gc.cc.) */
worker.store.addTempRoot(drvPath);
Likewise in ‘SubstitutionGoal::init’.
HTH,
Ludo’.
next prev parent reply other threads:[~2017-04-02 9:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-02 1:06 'guix build' and garbage collection Chris Marusich
2017-04-02 9:30 ` Ludovic Courtès [this message]
2017-04-03 6:40 ` Chris Marusich
2017-04-03 8:53 ` Ludovic Courtès
2017-04-03 16:29 ` Chris Marusich
2017-04-04 12:13 ` Ludovic Courtès
2017-04-07 3:47 ` Chris Marusich
2017-04-07 19:53 ` Ludovic Courtès
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=87inmnb1ha.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=cmmarusich@gmail.com \
--cc=guix-devel@gnu.org \
/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.