diff options
author | Vincent Ambo <mail@tazj.in> | 2020-08-20T02·28+0100 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2020-08-20T11·48+0000 |
commit | 33e8b0f975cd8934405c568cfa1d7e2a1edfa425 (patch) | |
tree | 2d67c57661cd424bfe6c87d33c4d38212f9a4e3c /third_party/nix/src/nix-env | |
parent | f7fa77f14dedad98ab9e8a014d3bcfd60565dfd0 (diff) |
chore(tvix): Thread a std::ostream through Store::buildPaths r/1689
This part of the store API needs to carry a handle to the log sink from now on, so that it can be passed in as appropriate from the gRPC handlers. In all places where there is no such handler available at the moment, the discarding log sink has been inserted. This can be used as a convenient grep target in the future. Change-Id: I26628e30b4c6437dccdf8f722ca2e8ed827dfc19 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1797 Tested-by: BuildkiteCI Reviewed-by: kanepyork <rikingcoding@gmail.com> Reviewed-by: glittershark <grfn@gws.fyi>
Diffstat (limited to 'third_party/nix/src/nix-env')
-rw-r--r-- | third_party/nix/src/nix-env/nix-env.cc | 4 | ||||
-rw-r--r-- | third_party/nix/src/nix-env/user-env.cc | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/third_party/nix/src/nix-env/nix-env.cc b/third_party/nix/src/nix-env/nix-env.cc index 7502a648d8c1..e42fc29c2267 100644 --- a/third_party/nix/src/nix-env/nix-env.cc +++ b/third_party/nix/src/nix-env/nix-env.cc @@ -722,8 +722,10 @@ static void opSet(Globals& globals, Strings opFlags, Strings opArgs) { if (globals.dryRun) { return; } + auto discard_logs = DiscardLogsSink(); nix::util::OkOrThrow(globals.state->store->buildPaths( - paths, globals.state->repair != 0u ? bmRepair : bmNormal)); + discard_logs, paths, + globals.state->repair != 0u ? bmRepair : bmNormal)); } else { printMissing(globals.state->store, {drv.queryOutPath()}); if (globals.dryRun) { diff --git a/third_party/nix/src/nix-env/user-env.cc b/third_party/nix/src/nix-env/user-env.cc index dac0c52a81b7..e3124a60e385 100644 --- a/third_party/nix/src/nix-env/user-env.cc +++ b/third_party/nix/src/nix-env/user-env.cc @@ -38,8 +38,9 @@ bool createUserEnv(EvalState& state, DrvInfos& elems, const Path& profile, } DLOG(INFO) << "building user environment dependencies"; + auto discard_logs = DiscardLogsSink(); util::OkOrThrow(state.store->buildPaths( - drvsToBuild, state.repair != 0u ? bmRepair : bmNormal)); + discard_logs, drvsToBuild, state.repair != 0u ? bmRepair : bmNormal)); /* Construct the whole top level derivation. */ PathSet references; @@ -139,7 +140,7 @@ bool createUserEnv(EvalState& state, DrvInfos& elems, const Path& profile, /* Realise the resulting store expression. */ DLOG(INFO) << "building user environment"; util::OkOrThrow(state.store->buildPaths( - {topLevelDrv}, state.repair != 0u ? bmRepair : bmNormal)); + discard_logs, {topLevelDrv}, state.repair != 0u ? bmRepair : bmNormal)); /* Switch the current user environment to the output path. */ auto store2 = state.store.dynamic_pointer_cast<LocalFSStore>(); |