diff options
author | Graham Christensen <graham@grahamc.com> | 2021-02-09 12:26:41 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-09 12:26:41 -0500 |
commit | f2245091d033a8037aeb29ae701d20611500af6d (patch) | |
tree | 371fbb954541041ab970e33a72e4e7f0a03da3de /src | |
parent | ee3846b5870f23064925e2d36439d9a3ec1688d1 (diff) |
Revert "narinfo: Change NAR URLs to be addressed on the NAR hash instead of the compressed hash"
Diffstat (limited to 'src')
-rw-r--r-- | src/libstore/binary-cache-store.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstore/binary-cache-store.cc b/src/libstore/binary-cache-store.cc index 15163ead5..4f5f8607d 100644 --- a/src/libstore/binary-cache-store.cc +++ b/src/libstore/binary-cache-store.cc @@ -176,7 +176,11 @@ ref<const ValidPathInfo> BinaryCacheStore::addToStoreCommon( auto [fileHash, fileSize] = fileHashSink.finish(); narInfo->fileHash = fileHash; narInfo->fileSize = fileSize; - narInfo->url = "nar/" + info.narHash.to_string(Base32, false) + ".nar"; + narInfo->url = "nar/" + narInfo->fileHash->to_string(Base32, false) + ".nar" + + (compression == "xz" ? ".xz" : + compression == "bzip2" ? ".bz2" : + compression == "br" ? ".br" : + ""); auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(now2 - now1).count(); printMsg(lvlTalkative, "copying path '%1%' (%2% bytes, compressed %3$.1f%% in %4% ms) to binary cache", |