mirror of
https://github.com/NixOS/nix.git
synced 2025-11-24 03:09:35 +01:00
Simplify local drv goal a bit more
- `chrootParentDir` can be a local variable instead of a class variable. - `getChildStatus` can be inlined. Again, we have the `assert(!hook);` in the local building case, which makes for a simpler thing inlined.
This commit is contained in:
parent
4b521f14ac
commit
a87589a035
4 changed files with 8 additions and 30 deletions
|
|
@ -801,16 +801,6 @@ void replaceValidPath(const Path & storePath, const Path & tmpPath)
|
|||
}
|
||||
|
||||
|
||||
int DerivationGoal::getChildStatus()
|
||||
{
|
||||
#ifndef _WIN32 // TODO enable build hook on Windows
|
||||
return hook->pid.kill();
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void runPostBuildHook(
|
||||
Store & store,
|
||||
Logger & logger,
|
||||
|
|
@ -908,7 +898,12 @@ Goal::Co DerivationGoal::hookDone()
|
|||
to have terminated. In fact, the builder could also have
|
||||
simply have closed its end of the pipe, so just to be sure,
|
||||
kill it. */
|
||||
int status = getChildStatus();
|
||||
int status =
|
||||
#ifndef _WIN32 // TODO enable build hook on Windows
|
||||
hook->pid.kill();
|
||||
#else
|
||||
0;
|
||||
#endif
|
||||
|
||||
debug("builder process for '%s' finished", worker.store.printStorePath(drvPath));
|
||||
|
||||
|
|
|
|||
|
|
@ -262,8 +262,6 @@ struct DerivationGoal : public Goal
|
|||
*/
|
||||
HookReply tryBuildHook();
|
||||
|
||||
virtual int getChildStatus();
|
||||
|
||||
/**
|
||||
* Check that the derivation outputs all exist and register them
|
||||
* as valid.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue