@@ -106,6 +106,11 @@ class DerivationBuilderImpl : public DerivationBuilder, DerivationBuilderParams
106
106
107
107
private:
108
108
109
+ /* *
110
+ * User selected for running the builder.
111
+ */
112
+ std::unique_ptr<UserLock> buildUser;
113
+
109
114
/* *
110
115
* The cgroup of the builder, if any.
111
116
*/
@@ -251,30 +256,10 @@ class DerivationBuilderImpl : public DerivationBuilder, DerivationBuilderParams
251
256
252
257
public:
253
258
254
- /* *
255
- * Set up build environment / sandbox, acquiring resources (e.g.
256
- * locks as needed). After this is run, the builder should be
257
- * started.
258
- *
259
- * @returns true if successful, false if we could not acquire a build
260
- * user. In that case, the caller must wait and then try again.
261
- */
262
259
bool prepareBuild () override ;
263
260
264
- /* *
265
- * Start building a derivation.
266
- */
267
- void startBuilder () override ;;
261
+ void startBuilder () override ;
268
262
269
- /* *
270
- * Tear down build environment after the builder exits (either on
271
- * its own or if it is killed).
272
- *
273
- * @returns The first case indicates failure during output
274
- * processing. A status code and exception are returned, providing
275
- * more information. The second case indicates success, and
276
- * realisations for each output of the derivation are returned.
277
- */
278
263
std::variant<std::pair<BuildResult::Status, Error>, SingleDrvOutputs> unprepareBuild () override ;
279
264
280
265
private:
@@ -306,10 +291,6 @@ class DerivationBuilderImpl : public DerivationBuilder, DerivationBuilderParams
306
291
307
292
public:
308
293
309
- /* *
310
- * Stop the in-process nix daemon thread.
311
- * @see startDaemon
312
- */
313
294
void stopDaemon () override ;
314
295
315
296
private:
@@ -341,15 +322,8 @@ class DerivationBuilderImpl : public DerivationBuilder, DerivationBuilderParams
341
322
342
323
public:
343
324
344
- /* *
345
- * Delete the temporary directory, if we have one.
346
- */
347
325
void deleteTmpDir (bool force) override ;
348
326
349
- /* *
350
- * Kill any processes running under the build user UID or in the
351
- * cgroup of the build.
352
- */
353
327
void killSandbox (bool getStats) override ;
354
328
355
329
private:
0 commit comments