mirror of
https://github.com/NixOS/nix
synced 2025-07-07 06:01:48 +02:00
importPaths(): Optionally add NARs to binary cache accessor
This enables an optimisation in hydra-queue-runner, preventing a download of a NAR it just uploaded to the cache when reading files like hydra-build-products.
This commit is contained in:
parent
00b2c05749
commit
cca4a8dc1a
10 changed files with 58 additions and 44 deletions
|
@ -227,8 +227,11 @@ public:
|
|||
void exportPaths(const Paths & paths, bool sign, Sink & sink);
|
||||
|
||||
/* Import a sequence of NAR dumps created by exportPaths() into
|
||||
the Nix store. */
|
||||
virtual Paths importPaths(bool requireSignature, Source & source) = 0;
|
||||
the Nix store. Optionally, the contents of the NARs are
|
||||
preloaded into the specified FS accessor to speed up subsequent
|
||||
access. */
|
||||
virtual Paths importPaths(bool requireSignature, Source & source,
|
||||
std::shared_ptr<FSAccessor> accessor) = 0;
|
||||
|
||||
/* For each path, if it's a derivation, build it. Building a
|
||||
derivation means ensuring that the output paths are valid. If
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue