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-26T19·14-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-26T19·14-0400
commit8c7910083976e255300efa797030448f5a1cb864 (patch)
treeafbd7a37d0724feb408a2d025364ed3938b5673a /src/libstore/local-store.hh
parentaa115e22df1c80e8878237a9e704d7d70783a243 (diff)
parent3a4623afbbc1bff85bde33167d36e8c5a4a3df0d (diff)
Merge branch 'master' into no-manifests
Diffstat (limited to 'src/libstore/local-store.hh')
-rw-r--r--src/libstore/local-store.hh17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/libstore/local-store.hh b/src/libstore/local-store.hh
index 07d8198ecaa5..15dff1d02052 100644
--- a/src/libstore/local-store.hh
+++ b/src/libstore/local-store.hh
@@ -1,5 +1,4 @@
-#ifndef __LOCAL_STORE_H
-#define __LOCAL_STORE_H
+#pragma once
 
 #include <string>
 
@@ -86,6 +85,8 @@ private:
 
     typedef std::map<Path, RunningSubstituter> RunningSubstituters;
     RunningSubstituters runningSubstituters;
+
+    Path linksDir;
     
 public:
 
@@ -168,8 +169,11 @@ 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);
 
+    /* Optimise a single store path. */
+    void optimisePath(const Path & path);
+    
     /* Check the integrity of the Nix store. */
     void verifyStore(bool checkContents);
 
@@ -260,6 +264,8 @@ private:
         
     int openGCLock(LockType lockType);
     
+    void removeUnusedLinks();
+
     void startSubstituter(const Path & substituter,
         RunningSubstituter & runningSubstituter);
 
@@ -268,6 +274,8 @@ private:
     Path importPath(bool requireSignature, Source & source);
     
     void checkDerivationOutputs(const Path & drvPath, const Derivation & drv);
+
+    void optimisePath_(OptimiseStats & stats, const Path & path);
 };
 
 
@@ -302,6 +310,3 @@ void deletePathWrapped(const Path & path,
 void deletePathWrapped(const Path & path);
  
 }
-
-
-#endif /* !__LOCAL_STORE_H */