1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00

Relegate toRealPath to LocalFSStore

Fix #14480

This method is not well-defined for arbitrary stores, which do not have
a notion of a "real path" -- it is only well-defined for local file
systems stores, which do have exactly that notion, and so it is moved to
that sub-interface instead.

Some call-sites had to be fixed up for this, but in all cases the
changes are positive. Using `getFSSourceAccessor` allows for more other
stores to work properly. `nix-channel` was straight-up wrong in the case
of redirected local stores. And the building logic with remote building
and a non-local store is also fixed, properly gating some deletions on
store type.

Co-authored-by: Robert Hensing <robert@roberthensing.nl>
This commit is contained in:
John Ericson 2025-11-05 10:03:49 -05:00
parent 948c89b367
commit 099af7578f
12 changed files with 63 additions and 55 deletions

View file

@ -896,7 +896,7 @@ static void performOp(
auto path = WorkerProto::Serialise<StorePath>::read(*store, rconn);
logger->startWork();
logger->stopWork();
dumpPath(store->toRealPath(path), conn.to);
store->narFromPath(path, conn.to);
break;
}