nix-copy-closure / build-remote.pl: Disable signature checking

This restores the Nix 1.11 behaviour.
This commit is contained in:
Eelco Dolstra 2016-05-31 11:18:45 +02:00
parent e4f0ba55ac
commit c2d27d30cf
12 changed files with 20 additions and 17 deletions

View file

@ -904,14 +904,15 @@ void LocalStore::invalidatePath(State & state, const Path & path)
}
void LocalStore::addToStore(const ValidPathInfo & info, const std::string & nar, bool repair)
void LocalStore::addToStore(const ValidPathInfo & info, const std::string & nar,
bool repair, bool dontCheckSigs)
{
Hash h = hashString(htSHA256, nar);
if (h != info.narHash)
throw Error(format("hash mismatch importing path %s; expected hash %s, got %s") %
info.path % info.narHash.to_string() % h.to_string());
if (requireSigs && !info.checkSignatures(publicKeys))
if (requireSigs && !dontCheckSigs && !info.checkSignatures(publicKeys))
throw Error(format("cannot import path %s because it lacks a valid signature") % info.path);
addTempRoot(info.path);