about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-05-29T14·08+0200
committerEelco Dolstra <edolstra@gmail.com>2017-05-29T14·08+0200
commit6e01ecd112dce8d8bbe46c839f982892a3ffb589 (patch)
tree3f199e41ad88e827adc8cd441ae464998cb76998 /src
parent588dad4084711e71a4dcb0758b2daf2fe03e2c8b (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/libstore/store-api.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc
index e6cbd53dc80a..76ed9942256b 100644
--- a/src/libstore/store-api.cc
+++ b/src/libstore/store-api.cc
@@ -547,6 +547,7 @@ void copyStorePath(ref<Store> srcStore, ref<Store> dstStore,
     if (!info->narHash && dontCheckSigs) {
         auto info2 = make_ref<ValidPathInfo>(*info);
         info2->narHash = hashString(htSHA256, *sink.s);
+        if (!info->narSize) info2->narSize = sink.s->size();
         info = info2;
     }