mirror of
https://github.com/NixOS/nix.git
synced 2025-11-26 12:10:59 +01:00
Before creating multiple derivation - component instances
This commit is contained in:
parent
986a50ac78
commit
9c46444641
9 changed files with 120 additions and 97 deletions
|
|
@ -764,7 +764,7 @@ void DerivationGoal::haveDerivation()
|
|||
assert(store->isValidPath(drvPath));
|
||||
|
||||
/* Get the derivation. */
|
||||
drv = derivationFromPath(drvPath); //wouter look here
|
||||
drv = derivationFromPath(drvPath);
|
||||
|
||||
for (DerivationOutputs::iterator i = drv.outputs.begin();
|
||||
i != drv.outputs.end(); ++i)
|
||||
|
|
@ -773,6 +773,8 @@ void DerivationGoal::haveDerivation()
|
|||
/* Check what outputs paths are not already valid. */
|
||||
PathSet invalidOutputs = checkPathValidity(false);
|
||||
|
||||
|
||||
|
||||
/* If they are all valid, then we're done. */
|
||||
if (invalidOutputs.size() == 0) {
|
||||
amDone(ecSuccess);
|
||||
|
|
@ -1377,6 +1379,7 @@ void DerivationGoal::startBuilder()
|
|||
tmpDir = createTempDir();
|
||||
|
||||
/* Create the state directory where the component can store it's state files place */
|
||||
//TODO MOVEEEEEEEEEEE
|
||||
//We only create state dirs when state is enabled and when the dirs need to be created before the installation
|
||||
if(drv.stateOutputs.size() != 0)
|
||||
if(drv.stateOutputs.find("state")->second.getCreateDirsBeforeInstall())
|
||||
|
|
@ -2476,9 +2479,10 @@ void LocalStore::buildDerivations(const PathSet & drvPaths)
|
|||
Worker worker;
|
||||
|
||||
Goals goals;
|
||||
for (PathSet::const_iterator i = drvPaths.begin();
|
||||
i != drvPaths.end(); ++i)
|
||||
for (PathSet::const_iterator i = drvPaths.begin(); i != drvPaths.end(); ++i){
|
||||
goals.insert(worker.makeDerivationGoal(*i));
|
||||
printMsg(lvlError, format("No component build, but state check: %1%") % *i);
|
||||
}
|
||||
|
||||
worker.run(goals);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue