daemon: Read unsigned nar size and download size from substituter.

Fixes <https://issues.guix.gnu.org/51983>.
Reported by Tobias Geerinckx-Rice <me@tobias.gr>.

* nix/libstore/local-store.cc (LocalStore::querySubstitutablePathInfos):
Expect 'unsigned long long' for 'downloadSize' and 'narSize'.
* tests/store.scm ("substitute query and large size"): New test.
This commit is contained in:
Ludovic Courtès 2021-11-24 22:58:12 +01:00
parent a4cbd31c5c
commit 1eb40a6dc4
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
2 changed files with 36 additions and 2 deletions

View file

@ -907,8 +907,8 @@ void LocalStore::querySubstitutablePathInfos(PathSet & paths, SubstitutablePathI
assertStorePath(p);
info.references.insert(p);
}
info.downloadSize = getIntLineFromSubstituter<long long>(run);
info.narSize = getIntLineFromSubstituter<long long>(run);
info.downloadSize = getIntLineFromSubstituter<unsigned long long>(run);
info.narSize = getIntLineFromSubstituter<unsigned long long>(run);
}
}