From: ludo@gnu.org (Ludovic Courtès)
To: nix-dev <nix-dev@lists.science.uu.nl>
Cc: guix-devel <guix-devel@gnu.org>
Subject: [PATCH]
Date: Mon, 14 Apr 2014 15:38:01 +0200 [thread overview]
Message-ID: <878ur8jakm.fsf@gnu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 225 bytes --]
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?
Thanks,
Ludo’.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 482 bytes --]
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc
index 96e891f..299bf5f 100644
--- a/src/libstore/gc.cc
+++ b/src/libstore/gc.cc
@@ -287,10 +287,7 @@ static void foundRoot(StoreAPI & store,
const Path & path, const Path & target, Roots & roots)
{
Path storePath = toStorePath(target);
- if (store.isValidPath(storePath))
roots[path] = storePath;
- else
- printMsg(lvlInfo, format("skipping invalid root from `%1%' to `%2%'") % path % storePath);
}
[-- Attachment #3: Type: text/plain, Size: 149 bytes --]
_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev
next reply other threads:[~2014-04-14 13:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-14 13:38 Ludovic Courtès [this message]
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
[not found] ` <534D3898.7000503@logicblox.com>
2014-04-15 20:11 ` Ludovic Courtès
-- strict thread matches above, loose matches on Subject: below --
2016-08-07 16:18 [PATCH] ng0
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=878ur8jakm.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=nix-dev@lists.science.uu.nl \
/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.