mirror of
https://github.com/NixOS/nix.git
synced 2025-11-28 05:00:58 +01:00
* Add missing files to dist.
* Fix GC and substitute bugs related to self-references. Add a regression test.
This commit is contained in:
parent
32fa82a56a
commit
06b4424286
4 changed files with 14 additions and 5 deletions
|
|
@ -553,7 +553,10 @@ void deleteFromStore(const Path & _path)
|
|||
|
||||
Transaction txn(nixDB);
|
||||
if (isValidPathTxn(txn, path)) {
|
||||
if (getReferers(txn, path).size() > 0)
|
||||
PathSet referers = getReferers(txn, path);
|
||||
if (referers.size() > 1 ||
|
||||
(referers.size() == 1 &&
|
||||
*referers.begin() != path))
|
||||
throw Error(format("cannot delete path `%1%' because it is in use") % path);
|
||||
invalidatePath(path, txn);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue