From 5013b38df42353707cbd2b08a3db3a1eb925ae9c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 9 Sep 2025 14:16:56 +0200 Subject: [PATCH] Drop unused LegacySSHStore::addMultipleToStoreLegacy() --- .../include/nix/store/legacy-ssh-store.hh | 6 ------ src/libstore/legacy-ssh-store.cc | 16 ---------------- 2 files changed, 22 deletions(-) diff --git a/src/libstore/include/nix/store/legacy-ssh-store.hh b/src/libstore/include/nix/store/legacy-ssh-store.hh index 91e021433..ac31506d0 100644 --- a/src/libstore/include/nix/store/legacy-ssh-store.hh +++ b/src/libstore/include/nix/store/legacy-ssh-store.hh @@ -179,12 +179,6 @@ public: */ StorePathSet queryValidPaths(const StorePathSet & paths, bool lock, SubstituteFlag maybeSubstitute = NoSubstitute); - /** - * Just exists because this is exactly what Hydra was doing, and we - * don't yet want an algorithmic change. - */ - void addMultipleToStoreLegacy(Store & srcStore, const StorePathSet & paths); - void connect() override; unsigned int getProtocol() override; diff --git a/src/libstore/legacy-ssh-store.cc b/src/libstore/legacy-ssh-store.cc index 0e9ee35bf..d42dca74a 100644 --- a/src/libstore/legacy-ssh-store.cc +++ b/src/libstore/legacy-ssh-store.cc @@ -302,22 +302,6 @@ StorePathSet LegacySSHStore::queryValidPaths(const StorePathSet & paths, bool lo return conn->queryValidPaths(*this, lock, paths, maybeSubstitute); } -void LegacySSHStore::addMultipleToStoreLegacy(Store & srcStore, const StorePathSet & paths) -{ - auto conn(connections->get()); - conn->to << ServeProto::Command::ImportPaths; - try { - srcStore.exportPaths(paths, conn->to); - } catch (...) { - conn->good = false; - throw; - } - conn->to.flush(); - - if (readInt(conn->from) != 1) - throw Error("remote machine failed to import closure"); -} - void LegacySSHStore::connect() { auto conn(connections->get());