File tree Expand file tree Collapse file tree 4 files changed +11
-29
lines changed
Expand file tree Collapse file tree 4 files changed +11
-29
lines changed Original file line number Diff line number Diff line change @@ -945,7 +945,15 @@ Goal::Co DerivationGoal::hookDone()
945945
946946 /* Compute the FS closure of the outputs and register them as
947947 being valid. */
948- auto builtOutputs = registerOutputs ();
948+ auto builtOutputs =
949+ /* When using a build hook, the build hook can register the output
950+ as valid (by doing `nix-store --import'). If so we don't have
951+ to do anything here.
952+
953+ We can only early return when the outputs are known a priori. For
954+ floating content-addressing derivations this isn't the case.
955+ */
956+ assertPathValidity ();
949957
950958 StorePathSet outputPaths;
951959 for (auto & [_, output] : builtOutputs)
@@ -1174,18 +1182,6 @@ HookReply DerivationGoal::tryBuildHook()
11741182}
11751183
11761184
1177- SingleDrvOutputs DerivationGoal::registerOutputs ()
1178- {
1179- /* When using a build hook, the build hook can register the output
1180- as valid (by doing `nix-store --import'). If so we don't have
1181- to do anything here.
1182-
1183- We can only early return when the outputs are known a priori. For
1184- floating content-addressing derivations this isn't the case.
1185- */
1186- return assertPathValidity ();
1187- }
1188-
11891185Path DerivationGoal::openLogFile ()
11901186{
11911187 logSize = 0 ;
Original file line number Diff line number Diff line change @@ -262,12 +262,6 @@ struct DerivationGoal : public Goal
262262 */
263263 HookReply tryBuildHook ();
264264
265- /* *
266- * Check that the derivation outputs all exist and register them
267- * as valid.
268- */
269- virtual SingleDrvOutputs registerOutputs ();
270-
271265 /* *
272266 * Open a log file and a pipe to it.
273267 */
Original file line number Diff line number Diff line change @@ -2330,15 +2330,7 @@ void LocalDerivationGoal::runChild()
23302330
23312331SingleDrvOutputs LocalDerivationGoal::registerOutputs ()
23322332{
2333- /* When using a build hook, the build hook can register the output
2334- as valid (by doing `nix-store --import'). If so we don't have
2335- to do anything here.
2336-
2337- We can only early return when the outputs are known a priori. For
2338- floating content-addressing derivations this isn't the case.
2339- */
2340- if (hook)
2341- return DerivationGoal::registerOutputs ();
2333+ assert (!hook);
23422334
23432335 std::map<std::string, ValidPathInfo> infos;
23442336
Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ struct LocalDerivationGoal : public DerivationGoal
239239 * Check that the derivation outputs all exist and register them
240240 * as valid.
241241 */
242- SingleDrvOutputs registerOutputs () override ;
242+ SingleDrvOutputs registerOutputs ();
243243
244244 void signRealisation (Realisation &) override ;
245245
You can’t perform that action at this time.
0 commit comments