about summary refs log tree commit diff
path: root/src/libstore/local-store.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-23T16·08-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-23T21·14-0400
commit564fb7d9fa80d06397a88d69f26439727cb922c5 (patch)
treeb6944bacbc3f4d8cbac9d886686572aa6fdbbe8c /src/libstore/local-store.hh
parented59bf7a181bb382dea7dd72da52bf91f60deb8d (diff)
optimiseStore(): Use a content-addressed file store in /nix/store/.links
optimiseStore() now creates persistent, content-addressed hard links
in /nix/store/.links.  For instance, if it encounters a file P with
hash H, it will create a hard link

  P' = /nix/store/.link/<H>

to P if P' doesn't already exist; if P' exist, then P is replaced by a
hard link to P'.  This is better than the previous in-memory map,
because it had the tendency to unnecessarily replace hard links with a
hard link to whatever happened to be the first file with a given hash
it encountered.  It also allows on-the-fly, incremental optimisation.
Diffstat (limited to 'src/libstore/local-store.hh')
-rw-r--r--src/libstore/local-store.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/local-store.hh b/src/libstore/local-store.hh
index eb7705219a..1bb47fb3ba 100644
--- a/src/libstore/local-store.hh
+++ b/src/libstore/local-store.hh
@@ -167,7 +167,7 @@ public:
 
     /* Optimise the disk space usage of the Nix store by hard-linking
        files with the same contents. */
-    void optimiseStore(bool dryRun, OptimiseStats & stats);
+    void optimiseStore(OptimiseStats & stats);
 
     /* Check the integrity of the Nix store. */
     void verifyStore(bool checkContents);