Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nix
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d8306148e049
Choose a base ref
...
head repository: NixOS/nix
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 908590dc6cfc
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Oct 18, 2017

  1. Verified

    This commit was signed with the committer’s verified signature.
    edolstra Eelco Dolstra
    Copy the full SHA
    75cd75b View commit details
  2. 5

    Verified

    This commit was signed with the committer’s verified signature.
    edolstra Eelco Dolstra
    Copy the full SHA
    908590d View commit details
Showing with 7 additions and 3 deletions.
  1. +2 −2 src/libstore/binary-cache-store.cc
  2. +5 −1 src/libstore/remote-fs-accessor.cc
4 changes: 2 additions & 2 deletions src/libstore/binary-cache-store.cc
Original file line number Diff line number Diff line change
@@ -116,7 +116,7 @@ void BinaryCacheStore::addToStore(const ValidPathInfo & info, const ref<std::str

if (accessor_) {
accessor_->nars.emplace(info.path, narAccessor);
accessor_->addToCache(info.path, *nar);
//accessor_->addToCache(info.path, *nar);
}

std::function<void(const Path &, JSONPlaceholder &)> recurse;
@@ -164,7 +164,7 @@ void BinaryCacheStore::addToStore(const ValidPathInfo & info, const ref<std::str
else {
if (accessor_) {
accessor_->nars.emplace(info.path, makeNarAccessor(nar));
accessor_->addToCache(info.path, *nar);
//accessor_->addToCache(info.path, *nar);
}
}

6 changes: 5 additions & 1 deletion src/libstore/remote-fs-accessor.cc
Original file line number Diff line number Diff line change
@@ -19,9 +19,13 @@ Path RemoteFSAccessor::makeCacheFile(const Path & storePath)

void RemoteFSAccessor::addToCache(const Path & storePath, const std::string & nar)
{
if (cacheDir != "")
try {
if (cacheDir == "") return;
/* FIXME: do this asynchronously. */
writeFile(makeCacheFile(storePath), nar);
} catch (...) {
ignoreException();
}
}

std::pair<ref<FSAccessor>, Path> RemoteFSAccessor::fetch(const Path & path_)