aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/local-store.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-10-08 16:58:19 +0200
committerEelco Dolstra <edolstra@gmail.com>2021-10-13 12:12:44 +0200
commit35c98a59c5f09d8ca376ac809e87d14ff2fcbde1 (patch)
tree402335e765afa28d07d10144a945156c22ded048 /src/libstore/local-store.hh
parente31a48366f19d5fa452df6273e817a4ea5516e50 (diff)
Fix GC when there are cycles in the referrers graph
(where "referrers" includes the reverse of derivation outputs and derivers). Now we do a full traversal to look if we can reach any root. If not, all paths reached can be deleted.
Diffstat (limited to 'src/libstore/local-store.hh')
-rw-r--r--src/libstore/local-store.hh5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libstore/local-store.hh b/src/libstore/local-store.hh
index 08bbc1a7d..8629e1528 100644
--- a/src/libstore/local-store.hh
+++ b/src/libstore/local-store.hh
@@ -240,11 +240,10 @@ private:
struct GCState;
- bool tryToDelete(
+ bool canReachRoot(
GCState & state,
StorePathSet & visited,
- const StorePath & path,
- bool recursive);
+ const StorePath & path);
void deleteFromStore(GCState & state, std::string_view baseName);