aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-03-30 17:35:48 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-03-30 17:35:48 +0200
commit9cee600c88d2a23b872be1c175450011a6d52152 (patch)
tree47b7f4fbad763b3a721ce80a73a98644eb5fd445 /src/libstore/build.cc
parentb86555aa2b51aaadf59363b0561dd0d68df74b6d (diff)
LocalStore: Keep track of ultimately trusted paths
These are content-addressed paths or outputs of locally performed builds. They are trusted even if they don't have signatures, so "nix verify-paths" won't complain about them.
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index ed4e0f659..31c321c83 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -2743,6 +2743,14 @@ void DerivationGoal::registerOutputs()
throw Error(format("derivation ‘%1%’ may not be deterministic: output ‘%2%’ differs")
% drvPath % path);
}
+
+ /* Since we verified the build, it's now ultimately
+ trusted. */
+ if (!info.ultimate) {
+ info.ultimate = true;
+ worker.store.registerValidPaths({info});
+ }
+
continue;
}
@@ -2799,6 +2807,7 @@ void DerivationGoal::registerOutputs()
info.narSize = hash.second;
info.references = references;
info.deriver = drvPath;
+ info.ultimate = true;
infos.push_back(info);
}