mirror of
https://github.com/NixOS/nix.git
synced 2025-11-17 07:52:43 +01:00
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.
This commit is contained in:
parent
e31a48366f
commit
35c98a59c5
2 changed files with 45 additions and 34 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue