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: 7d8c99eb4384
Choose a base ref
...
head repository: NixOS/nix
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 906d56a96b44
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Oct 11, 2019

  1. Verified

    This commit was signed with the committer’s verified signature.
    dimkl Dimitris Klouvas
    Copy the full SHA
    906d56a View commit details
Showing with 9 additions and 1 deletion.
  1. +1 −1 src/libstore/remote-store.cc
  2. +5 −0 src/libstore/remote-store.hh
  3. +3 −0 src/libstore/ssh-store.cc
2 changes: 1 addition & 1 deletion src/libstore/remote-store.cc
Original file line number Diff line number Diff line change
@@ -151,7 +151,7 @@ void RemoteStore::initConnection(Connection & conn)
conn.to << PROTOCOL_VERSION;

if (GET_PROTOCOL_MINOR(conn.daemonVersion) >= 14) {
int cpu = settings.lockCPU ? lockToCurrentCPU() : -1;
int cpu = sameMachine() && settings.lockCPU ? lockToCurrentCPU() : -1;
if (cpu != -1)
conn.to << 1 << cpu;
else
5 changes: 5 additions & 0 deletions src/libstore/remote-store.hh
Original file line number Diff line number Diff line change
@@ -29,6 +29,8 @@ public:
const Setting<unsigned int> maxConnectionAge{(Store*) this, std::numeric_limits<unsigned int>::max(),
"max-connection-age", "number of seconds to reuse a connection"};

virtual bool sameMachine() = 0;

RemoteStore(const Params & params);

/* Implementations of abstract store API methods. */
@@ -146,6 +148,9 @@ public:

std::string getUri() override;

bool sameMachine()
{ return true; }

private:

ref<RemoteStore::Connection> openConnection() override;
3 changes: 3 additions & 0 deletions src/libstore/ssh-store.cc
Original file line number Diff line number Diff line change
@@ -35,6 +35,9 @@ class SSHStore : public RemoteStore
return uriScheme + host;
}

bool sameMachine()
{ return false; }

void narFromPath(const Path & path, Sink & sink) override;

ref<FSAccessor> getFSAccessor() override;