From: ludo@gnu.org (Ludovic Courtès)
To: Shea Levy <shea@shealevy.com>
Cc: guix-devel <guix-devel@gnu.org>, nix-dev <nix-dev@lists.science.uu.nl>
Subject: Re: [PATCH] Allow roots to refer to arbitrary files in the store
Date: Tue, 15 Apr 2014 21:34:01 +0200 [thread overview]
Message-ID: <874n1u2xqu.fsf@gnu.org> (raw)
In-Reply-To: <20140415131118.GA2284@nixos> (Shea Levy's message of "Tue, 15 Apr 2014 09:11:18 -0400")
Shea Levy <shea@shealevy.com> skribis:
> On Mon, Apr 14, 2014 at 04:59:15PM +0200, Ludovic Courtès wrote:
>> ludo@gnu.org (Ludovic Courtès) skribis:
>>
>> > Shea Levy <shea@shealevy.com> skribis:
>> >
>> >> On Mon, Apr 14, 2014 at 03:38:01PM +0200, Ludovic Courtès wrote:
>> >>> The patch below allows files such as /nix/store/foo to be protected from
>> >>> GC if a root refers to them. This makes it easy for a build hook to use
>> >>> such files for its temporary working files.
>> >>>
>> >>> WDYT?
>> >>>
>> >>
>> >> It seems a bit odd to me to be using the store as a temporary file
>> >> location. What's wrong with $TMPDIR?
>> >
>> > Well, this is useful for build hooks, because it guarantees that any
>> > garbage they leave there will eventually be reclaimed.
>>
>> It also guarantees that this thing lives on the same file system as the
>> store, which means that rename(2) can be used to move it to its final
>> location in the store.
>>
>
> Hmm using the store as an auto-collected $TMPDIR seems wrong, but this
> is a decent argument. Do you have a specific use case already planned?
Yup, the build hook, as I wrote (specifically, for the temporary it uses
when restoring from a Nar.)
The other option is to use the temporary root file (that’s what
build-remote.pl does.) That’s nice, but it requires exposing a lot of
implementation details (GC lock, GC roots directory, etc.)
Ludo’.
_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev
next prev parent reply other threads:[~2014-04-15 19:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-14 13:38 [PATCH] Ludovic Courtès
2014-04-14 13:45 ` [PATCH] Shea Levy
2014-04-14 14:45 ` [PATCH] Allow roots to refer to arbitrary files in the store Ludovic Courtès
2014-04-14 14:59 ` Ludovic Courtès
2014-04-15 13:11 ` Shea Levy
2014-04-15 19:34 ` Ludovic Courtès [this message]
[not found] ` <534D3898.7000503@logicblox.com>
2014-04-15 20:11 ` 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=874n1u2xqu.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=nix-dev@lists.science.uu.nl \
--cc=shea@shealevy.com \
/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.