@@ -112,7 +112,21 @@ Goal::Co DrvOutputSubstitutionGoal::init()
112112 if (failed)
113113 continue ;
114114
115- co_return realisationFetched (std::move (waitees), outputInfo, sub);
115+ waitees.insert (worker.makePathSubstitutionGoal (outputInfo->outPath ));
116+
117+ co_await await (std::move (waitees));
118+
119+ trace (" output path substituted" );
120+
121+ if (nrFailed > 0 ) {
122+ debug (" The output path of the derivation output '%s' could not be substituted" , id.to_string ());
123+ co_return amDone (nrNoSubstituters > 0 ? ecNoSubstituters : ecFailed);
124+ }
125+
126+ worker.store .registerDrvOutput ({*outputInfo, id});
127+
128+ trace (" finished" );
129+ co_return amDone (ecSuccess);
116130 }
117131
118132 /* None left. Terminate this goal and let someone else deal
@@ -130,26 +144,6 @@ Goal::Co DrvOutputSubstitutionGoal::init()
130144 co_return amDone (substituterFailed ? ecFailed : ecNoSubstituters);
131145}
132146
133- Goal::Co DrvOutputSubstitutionGoal::realisationFetched (
134- Goals waitees, std::shared_ptr<const UnkeyedRealisation> outputInfo, nix::ref<nix::Store> sub)
135- {
136- waitees.insert (worker.makePathSubstitutionGoal (outputInfo->outPath ));
137-
138- co_await await (std::move (waitees));
139-
140- trace (" output path substituted" );
141-
142- if (nrFailed > 0 ) {
143- debug (" The output path of the derivation output '%s' could not be substituted" , id.to_string ());
144- co_return amDone (nrNoSubstituters > 0 ? ecNoSubstituters : ecFailed);
145- }
146-
147- worker.store .registerDrvOutput ({*outputInfo, id});
148-
149- trace (" finished" );
150- co_return amDone (ecSuccess);
151- }
152-
153147std::string DrvOutputSubstitutionGoal::key ()
154148{
155149 return " a$" + std::string (id.to_string ());
0 commit comments