diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-05-01 20:03:25 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-05-01 20:03:25 +0200 |
commit | 3a5f04f48cc39eec5cc454e387aa290e08295aff (patch) | |
tree | 0686a99ce37988e1455f748a72f78a132c8af45f /src/libstore/store-api.cc | |
parent | 031d70e5009fcce58afabc9113d5a5de4a16b19a (diff) |
build-remote: Don't require signatures
This restores the old behaviour.
Diffstat (limited to 'src/libstore/store-api.cc')
-rw-r--r-- | src/libstore/store-api.cc | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index 75de4c933..b5a91e536 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -542,15 +542,22 @@ void copyStorePath(ref<Store> srcStore, ref<Store> dstStore, StringSink sink; srcStore->narFromPath({storePath}, sink); - if (srcStore->isTrusted()) - dontCheckSigs = true; - if (!info->narHash && dontCheckSigs) { auto info2 = make_ref<ValidPathInfo>(*info); info2->narHash = hashString(htSHA256, *sink.s); info = info2; } + assert(info->narHash); + + if (info->ultimate) { + auto info2 = make_ref<ValidPathInfo>(*info); + info2->ultimate = false; + info = info2; + } + + assert(info->narHash); + dstStore->addToStore(*info, sink.s, repair, dontCheckSigs); } @@ -802,7 +809,8 @@ std::list<ref<Store>> getDefaultSubstituters() } -void copyPaths(ref<Store> from, ref<Store> to, const PathSet & storePaths, bool substitute) +void copyPaths(ref<Store> from, ref<Store> to, const PathSet & storePaths, + bool substitute, bool dontCheckSigs) { PathSet valid = to->queryValidPaths(storePaths, substitute); @@ -830,7 +838,7 @@ void copyPaths(ref<Store> from, ref<Store> to, const PathSet & storePaths, bool if (!to->isValidPath(storePath)) { Activity act(*logger, lvlInfo, format("copying ā%sā...") % storePath); - copyStorePath(from, to, storePath); + copyStorePath(from, to, storePath, false, dontCheckSigs); logger->incProgress(copiedLabel); } else |