1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

Merge branch 'drv-outputs-map-allow-missing-namespace' of github.com:obsidiansystems/nix into templated-daemon-protocol

This commit is contained in:
Carlo Nucera 2020-08-06 15:52:33 -04:00
commit f795f0fabc
8 changed files with 112 additions and 89 deletions

View file

@ -815,7 +815,7 @@ static void opServe(Strings opFlags, Strings opArgs)
case cmdQueryValidPaths: {
bool lock = readInt(in);
bool substitute = readInt(in);
auto paths = read(*store, in, Proxy<StorePathSet> {});
auto paths = nix::worker_proto::read(*store, in, Phantom<StorePathSet> {});
if (lock && writeAllowed)
for (auto & path : paths)
store->addTempRoot(path);
@ -845,19 +845,19 @@ static void opServe(Strings opFlags, Strings opArgs)
}
}
write(*store, out, store->queryValidPaths(paths));
nix::worker_proto::write(*store, out, store->queryValidPaths(paths));
break;
}
case cmdQueryPathInfos: {
auto paths = read(*store, in, Proxy<StorePathSet> {});
auto paths = nix::worker_proto::read(*store, in, Phantom<StorePathSet> {});
// !!! Maybe we want a queryPathInfos?
for (auto & i : paths) {
try {
auto info = store->queryPathInfo(i);
out << store->printStorePath(info->path)
<< (info->deriver ? store->printStorePath(*info->deriver) : "");
write(*store, out, info->references);
nix::worker_proto::write(*store, out, info->references);
// !!! Maybe we want compression?
out << info->narSize // downloadSize
<< info->narSize;
@ -885,7 +885,7 @@ static void opServe(Strings opFlags, Strings opArgs)
case cmdExportPaths: {
readInt(in); // obsolete
store->exportPaths(read(*store, in, Proxy<StorePathSet> {}), out);
store->exportPaths(nix::worker_proto::read(*store, in, Phantom<StorePathSet> {}), out);
break;
}
@ -934,9 +934,9 @@ static void opServe(Strings opFlags, Strings opArgs)
case cmdQueryClosure: {
bool includeOutputs = readInt(in);
StorePathSet closure;
store->computeFSClosure(read(*store, in, Proxy<StorePathSet> {}),
store->computeFSClosure(nix::worker_proto::read(*store, in, Phantom<StorePathSet> {}),
closure, false, includeOutputs);
write(*store, out, closure);
nix::worker_proto::write(*store, out, closure);
break;
}
@ -949,7 +949,7 @@ static void opServe(Strings opFlags, Strings opArgs)
if (deriver != "")
info.deriver = store->parseStorePath(deriver);
info.narHash = Hash::parseAny(readString(in), htSHA256);
info.references = read(*store, in, Proxy<StorePathSet> {});
info.references = nix::worker_proto::read(*store, in, Phantom<StorePathSet> {});
in >> info.registrationTime >> info.narSize >> info.ultimate;
info.sigs = readStrings<StringSet>(in);
info.ca = parseContentAddressOpt(readString(in));