diff options
author | regnat <rg@regnat.ovh> | 2020-10-08 17:36:51 +0200 |
---|---|---|
committer | regnat <rg@regnat.ovh> | 2020-12-11 20:41:32 +0100 |
commit | 58cdab64acd4807f73768fb32acdde39b501799f (patch) | |
tree | 6e68a9f51e1a43d59d4e56ba58c0de6149662f7f /src/libstore/dummy-store.cc | |
parent | 9c143c411b2190a05907416266b0022e5b17dd02 (diff) |
Store metadata about drv outputs realisations
For each known realisation, store:
- its output
- its output path
This comes with a set of needed changes:
- New `realisations` module declaring the types needed for describing
these mappings
- New `Store::registerDrvOutput` method registering all the needed informations
about a derivation output (also replaces `LocalStore::linkDeriverToPath`)
- new `Store::queryRealisation` method to retrieve the informations for a
derivations
This introcudes some redundancy on the remote-store side between
`wopQueryDerivationOutputMap` and `wopQueryRealisation`.
However we might need to keep both (regardless of backwards compat)
because we sometimes need to get some infos for all the outputs of a
derivation (where `wopQueryDerivationOutputMap` is handy), but all the
stores can't implement it − because listing all the outputs of a
derivation isn't really possible for binary caches where the server
doesn't allow to list a directory.
Diffstat (limited to 'src/libstore/dummy-store.cc')
-rw-r--r-- | src/libstore/dummy-store.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstore/dummy-store.cc b/src/libstore/dummy-store.cc index 98b745c3a..91fc178db 100644 --- a/src/libstore/dummy-store.cc +++ b/src/libstore/dummy-store.cc @@ -60,6 +60,9 @@ struct DummyStore : public Store, public virtual DummyStoreConfig BuildResult buildDerivation(const StorePath & drvPath, const BasicDerivation & drv, BuildMode buildMode) override { unsupported("buildDerivation"); } + + std::optional<const Realisation> queryRealisation(const DrvOutput&) override + { unsupported("queryRealisation"); } }; static RegisterStoreImplementation<DummyStore, DummyStoreConfig> regDummyStore; |