1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-26 20:20:58 +01:00

State is now maintained (their paths are automatically shared), unless sharedState is set in the nix-expr, when a new version with the same drv-name of the component is installed

This commit is contained in:
Wouter den Breejen 2007-08-13 15:35:12 +00:00
parent 7424d72098
commit 4089bd5f19
9 changed files with 110 additions and 75 deletions

View file

@ -1729,13 +1729,13 @@ bool querySolidStateReferencesTxn(const Transaction & txn, const Path & statePat
return notempty;
}
void setSharedStateTxn(const Transaction & txn, const Path & statePath, const Path & shared_with)
void setSharedStateTxn(const Transaction & txn, const Path & fromExisting, const Path & toNew)
{
//Remove earlier entries
nixDB.delPair(txn, dbSharedState, statePath);
nixDB.delPair(txn, dbSharedState, toNew);
//Set new entry
nixDB.setString(txn, dbSharedState, statePath, shared_with);
nixDB.setString(txn, dbSharedState, toNew, fromExisting);
}
bool querySharedStateTxn(const Transaction & txn, const Path & statePath, Path & shared_with)