From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: [PATCH] Date: Mon, 14 Apr 2014 15:38:01 +0200 Message-ID: <878ur8jakm.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: nix-dev-bounces@lists.science.uu.nl Errors-To: nix-dev-bounces@lists.science.uu.nl To: nix-dev Cc: guix-devel List-Id: guix-devel.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline 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); } --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev --=-=-=--