Garbage collect unused links in /nix/store/.links

Incremental optimisation requires creating links in /nix/store/.links
to all files in the store.  However, this means that if we delete a
store path, no files are actually deleted because links in
/nix/store/.links still exists.  So we need to check /nix/store/.links
for files with a link count of 1 and delete them.
This commit is contained in:
Eelco Dolstra 2012-07-23 15:48:30 -04:00
parent 6193105710
commit 680ab6f83d
2 changed files with 39 additions and 0 deletions

View file

@ -264,6 +264,8 @@ private:
int openGCLock(LockType lockType);
void removeUnusedLinks();
void startSubstituter(const Path & substituter,
RunningSubstituter & runningSubstituter);