diff options
author | eldritch horrors <pennae@lix.systems> | 2024-03-04 07:13:00 +0100 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-03-04 07:13:00 +0100 |
commit | fa03f239239e516a3585f9323d0eff7787fc999f (patch) | |
tree | fe23e08ff4479373b9285595a3f946875081bcf2 /src | |
parent | 2e2f2579fa5320669420c28cf6d56f1213e037ae (diff) |
Merge pull request #9587 from amjoseph-nixpkgs/pr/wopBuildDerivation/explain
libstore/daemon.cc: note trust model difference in readDerivation()s
(cherry picked from commit 5c917c32048ef185ea0eec352c3505485aa3212c)
Change-Id: I9945bc84e9529b005eafdc5c08b5bf1553335340
Diffstat (limited to 'src')
-rw-r--r-- | src/libstore/daemon.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libstore/daemon.cc b/src/libstore/daemon.cc index 3e44f6e31..18b2f64c1 100644 --- a/src/libstore/daemon.cc +++ b/src/libstore/daemon.cc @@ -574,6 +574,15 @@ static void performOp(TunnelLogger * logger, ref<Store> store, case WorkerProto::Op::BuildDerivation: { auto drvPath = store->parseStorePath(readString(from)); BasicDerivation drv; + /* + * Note: unlike wopEnsurePath, this operation reads a + * derivation-to-be-realized from the client with + * readDerivation(Source,Store) rather than reading it from + * the local store with Store::readDerivation(). Since the + * derivation-to-be-realized is not registered in the store + * it cannot be trusted that its outPath was calculated + * correctly. + */ readDerivation(from, *store, drv, Derivation::nameFromPath(drvPath)); BuildMode buildMode = (BuildMode) readInt(from); logger->startWork(); |