mirror of
https://github.com/NixOS/nix
synced 2025-06-28 01:11:15 +02:00
* Maintain the references/referers relation also for derivations.
This simplifies garbage collection and `nix-store --query --requisites' since we no longer need to treat derivations specially. * Better maintaining of the invariants, e.g., setReferences() can only be called on a valid/substitutable path.
This commit is contained in:
parent
2a2756b856
commit
a24b78e9f1
8 changed files with 84 additions and 82 deletions
|
@ -1135,8 +1135,7 @@ void DerivationGoal::computeClosure()
|
|||
i != drv.outputs.end(); ++i)
|
||||
{
|
||||
registerValidPath(txn, i->second.path,
|
||||
contentHashes[i->second.path]);
|
||||
setReferences(txn, i->second.path,
|
||||
contentHashes[i->second.path],
|
||||
allReferences[i->second.path]);
|
||||
}
|
||||
txn.commit();
|
||||
|
@ -1494,7 +1493,7 @@ void SubstitutionGoal::finished()
|
|||
|
||||
Transaction txn;
|
||||
createStoreTransaction(txn);
|
||||
registerValidPath(txn, storePath, contentHash);
|
||||
registerValidPath(txn, storePath, contentHash, references);
|
||||
txn.commit();
|
||||
|
||||
outputLock->setDeletion(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue