diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-04-29 17:43:37 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-04-29 17:43:37 +0200 |
commit | 4dde0b0562115525f76943653357410835910a99 (patch) | |
tree | 3074cf437558175048fe087654c04ec1aa6e96ab /src/libstore | |
parent | 6963de209135d191bdb67cf126df4dda9b19d44e (diff) |
BinaryCacheStore: Support bzip2 compression
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/binary-cache-store.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstore/binary-cache-store.cc b/src/libstore/binary-cache-store.cc index ff717a5dc..411d10130 100644 --- a/src/libstore/binary-cache-store.cc +++ b/src/libstore/binary-cache-store.cc @@ -87,7 +87,10 @@ void BinaryCacheStore::addToCache(const ValidPathInfo & info, ref<std::string> n % duration); /* Atomically write the NAR file. */ - narInfo->url = "nar/" + printHash32(narInfo->fileHash) + ".nar.xz"; + narInfo->url = "nar/" + printHash32(narInfo->fileHash) + ".nar" + + (compression == "xz" ? ".xz" : + compression == "bzip2" ? ".bz2" : + ""); if (!fileExists(narInfo->url)) { stats.narWrite++; upsertFile(narInfo->url, *narCompressed); |