From 8c07ed1ddad6595cd679181b0b8d78e09fc6d152 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Fri, 22 Jan 2021 15:27:55 +0000 Subject: [PATCH] Improve documentation and test and requested --- src/libstore/store-api.hh | 6 +++--- tests/binary-cache-build-remote.sh | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index 3221cf249..9e98eb8f9 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/store-api.hh @@ -372,9 +372,9 @@ public: void queryPathInfo(const StorePath & path, Callback> callback) noexcept; - /* Check whether the given valid path info is sufficiently well-formed - (e.g. hash content-address or signature) in order to be included in the - given store. + /* Check whether the given valid path info is sufficiently attested, by + either being signed by a trusted public key or content-addressed, in + order to be included in the given store. These same checks would be performed in addToStore, but this allows an earlier failure in the case where dependencies need to be added too, but diff --git a/tests/binary-cache-build-remote.sh b/tests/binary-cache-build-remote.sh index ed51164a4..81cd21a4a 100644 --- a/tests/binary-cache-build-remote.sh +++ b/tests/binary-cache-build-remote.sh @@ -7,7 +7,10 @@ clearCacheCache (! nix-build --store "file://$cacheDir" dependencies.nix) # Succeeds with default store as build remote. -nix-build --store "file://$cacheDir" --builders 'auto - - 1 1' -j0 dependencies.nix +outPath=$(nix-build --store "file://$cacheDir" --builders 'auto - - 1 1' -j0 dependencies.nix) + +# Test that the path exactly exists in the destination store. +nix path-info --store "file://$cacheDir" $outPath # Succeeds without any build capability because no-op nix-build --store "file://$cacheDir" -j0 dependencies.nix