From a5c1e73fa8e004a93e37254a3582ba91048c4550 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Sun, 25 Aug 2024 13:41:56 +0200 Subject: libstore: add "is dependency" info to goal whether goal errors are reported via the `ex` member or just printed to the log depends on whether the goal is a toplevel goal or a dependency. if goals are aware of this themselves we can move error printing out of the worker loop, and since a running worker can only be used by running goals it's totally sufficient to keep a `Worker::running` flag for this Change-Id: I6b5cbe6eccee1afa5fde80653c4b968554ddd16f --- src/libstore/platform.cc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/libstore/platform.cc') diff --git a/src/libstore/platform.cc b/src/libstore/platform.cc index 72757e39b..f2c023c82 100644 --- a/src/libstore/platform.cc +++ b/src/libstore/platform.cc @@ -29,17 +29,18 @@ std::shared_ptr LocalDerivationGoal::makeLocalDerivationGoa const StorePath & drvPath, const OutputsSpec & wantedOutputs, Worker & worker, + bool isDependency, BuildMode buildMode ) { #if __linux__ - return std::make_shared(drvPath, wantedOutputs, worker, buildMode); + return std::make_shared(drvPath, wantedOutputs, worker, isDependency, buildMode); #elif __APPLE__ - return std::make_shared(drvPath, wantedOutputs, worker, buildMode); + return std::make_shared(drvPath, wantedOutputs, worker, isDependency, buildMode); #elif __FreeBSD__ - return std::make_shared(drvPath, wantedOutputs, worker, buildMode); + return std::make_shared(drvPath, wantedOutputs, worker, isDependency, buildMode); #else - return std::make_shared(drvPath, wantedOutputs, worker, buildMode); + return std::make_shared(drvPath, wantedOutputs, worker, isDependency, buildMode); #endif } @@ -48,24 +49,25 @@ std::shared_ptr LocalDerivationGoal::makeLocalDerivationGoa const BasicDerivation & drv, const OutputsSpec & wantedOutputs, Worker & worker, + bool isDependency, BuildMode buildMode ) { #if __linux__ return std::make_shared( - drvPath, drv, wantedOutputs, worker, buildMode + drvPath, drv, wantedOutputs, worker, isDependency, buildMode ); #elif __APPLE__ return std::make_shared( - drvPath, drv, wantedOutputs, worker, buildMode + drvPath, drv, wantedOutputs, worker, isDependency, buildMode ); #elif __FreeBSD__ return std::make_shared( - drvPath, drv, wantedOutputs, worker, buildMode + drvPath, drv, wantedOutputs, worker, isDependency, buildMode ); #else return std::make_shared( - drvPath, drv, wantedOutputs, worker, buildMode + drvPath, drv, wantedOutputs, worker, isDependency, buildMode ); #endif } -- cgit v1.2.3