Fix nix-copy-closure test

Fixes

  client# error: size mismatch importing path ‘/nix/store/ywf5fihjlxwijm6ygh6s0a353b5yvq4d-libidn2-0.16’; expected 0, got 120264

This is mostly an artifact of the NixOS VM test environment, where the
Nix database doesn't contain hashes/sizes.

http://hydra.nixos.org/build/53537471
This commit is contained in:
Eelco Dolstra 2017-05-29 16:08:56 +02:00
parent 588dad4084
commit 6e01ecd112
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -547,6 +547,7 @@ void copyStorePath(ref<Store> srcStore, ref<Store> dstStore,
if (!info->narHash && dontCheckSigs) { if (!info->narHash && dontCheckSigs) {
auto info2 = make_ref<ValidPathInfo>(*info); auto info2 = make_ref<ValidPathInfo>(*info);
info2->narHash = hashString(htSHA256, *sink.s); info2->narHash = hashString(htSHA256, *sink.s);
if (!info->narSize) info2->narSize = sink.s->size();
info = info2; info = info2;
} }