diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2011-12-25 16:38:37 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2011-12-25 16:38:37 +0000 |
commit | 8c42a8c8ff2986940a41d46b0bdaa1c2ff0f15ad (patch) | |
tree | 9149bcc1608f14a31b79a8165a772d127e90c196 /src/libstore | |
parent | 524fa8a4f11826fdf22005f3304366856f72ffa5 (diff) |
* Make sure that lock files are cleaned up properly when building
through the build hook.
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/build.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index a8ef9b23e..149cd8b09 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -1300,6 +1300,13 @@ void DerivationGoal::buildDone() being valid. */ computeClosure(); + /* It is now safe to delete the lock files, since all future + lockers will see that the output paths are valid; they will + not create new lock files with the same names as the old + (unlinked) lock files. */ + outputLocks.setDeletion(true); + outputLocks.unlock(); + } catch (BuildError & e) { printMsg(lvlError, e.msg()); outputLocks.unlock(); @@ -1987,13 +1994,6 @@ void DerivationGoal::computeClosure() infos.push_back(info); } worker.store.registerValidPaths(infos); - - /* It is now safe to delete the lock files, since all future - lockers will see that the output paths are valid; they will not - create new lock files with the same names as the old (unlinked) - lock files. */ - outputLocks.setDeletion(true); - outputLocks.unlock(); } |