From 103cfee056cbc8f002929fd5958e305c1a75fe45 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 22 Feb 2010 11:44:17 +0000 Subject: * 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. --- src/libstore/local-store.hh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/libstore/local-store.hh') 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); -- cgit 1.4.1