about summary refs log tree commit diff
path: root/src/libstore/local-store.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-02-22T11·44+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-02-22T11·44+0000
commit103cfee056cbc8f002929fd5958e305c1a75fe45 (patch)
treed790817c90c3cffeeed5a21b30cbda7562526128 /src/libstore/local-store.hh
parent299ff64812ce166d230f1b630f794be226c7a178 (diff)
* Revert r19650 (implement gc-keep-outputs by looking for derivations
  with the same name as the output) and instead use the
  DerivationOutputs table in the database, which is the correct way to
  to do things.

Diffstat (limited to 'src/libstore/local-store.hh')
-rw-r--r--src/libstore/local-store.hh9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libstore/local-store.hh b/src/libstore/local-store.hh
index f10ba18d5a71..6bd47b3055f7 100644
--- a/src/libstore/local-store.hh
+++ b/src/libstore/local-store.hh
@@ -103,6 +103,12 @@ public:
     void queryReferrers(const Path & path, PathSet & referrers);
 
     Path queryDeriver(const Path & path);
+
+    /* Return all currently valid derivations that have `path' as an
+       output.  (Note that the result of `queryDeriver()' is the
+       derivation that was actually used to produce `path', which may
+       not exist anymore.) */
+    PathSet queryValidDerivers(const Path & path);
     
     PathSet querySubstitutablePaths();
     
@@ -199,6 +205,7 @@ private:
     SQLiteStmt stmtRegisterFailedPath;
     SQLiteStmt stmtHasPathFailed;
     SQLiteStmt stmtAddDerivationOutput;
+    SQLiteStmt stmtQueryValidDerivers;
 
     int getSchema();
 
@@ -228,8 +235,6 @@ private:
 
     bool tryToDelete(GCState & state, const Path & path);
     
-    PathSet findDerivers(GCState & state, const Path & path);
-    
     bool isActiveTempFile(const GCState & state,
         const Path & path, const string & suffix);