1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-27 04:30:59 +01:00

Merged to R9429

This commit is contained in:
Wouter den Breejen 2007-10-08 14:53:37 +00:00
parent 67022b7cca
commit 8b31968c61
19 changed files with 314 additions and 28 deletions

View file

@ -446,6 +446,9 @@ void LocalStore::collectGarbage(GCAction action, const PathSet & pathsToDelete,
bool gcKeepDerivations =
queryBoolSetting("gc-keep-derivations", true);
gcKeepDerivations = true; //TODO for now. we always keep drvs in the state branch since we
//need some of them to lookup info
/* Acquire the global GC root. This prevents
a) New roots from being added.
b) Processes from creating new temporary root files. */
@ -453,7 +456,7 @@ void LocalStore::collectGarbage(GCAction action, const PathSet & pathsToDelete,
/* Find the roots. Since we've grabbed the GC lock, the set of
permanent roots cannot increase now. */
Roots rootMap = ignoreLiveness ? Roots() : nix::findRoots(true); //TODO Also find state roots?
Roots rootMap = ignoreLiveness ? Roots() : nix::findRoots(true); //TODO Also find state roots? TODO include sharing of state.
PathSet roots;
for (Roots::iterator i = rootMap.begin(); i != rootMap.end(); ++i)

View file

@ -645,8 +645,8 @@ void setDeriver(const Transaction & txn, const Path & storePath, const Path & de
/* Private function only used by addStateDeriver
* Merges a new derivation into a list of derivations, this function takes username and statepath
* into account. This function is used to update derivations that have only changed in their sub state
* paths that need to be versioned for example. We assume newdrv is the newest.
* into account. This function is used to update derivations that have only changed for example in their sub state
* paths that need to be versioned. We assume newdrv is the newest.
*/
PathSet mergeNewDerivationIntoListTxn(const Transaction & txn, const Path & storepath, const Path & newdrv, const PathSet drvs, bool deleteDrvs)
{