aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/store-api.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/store-api.hh')
-rw-r--r--src/libstore/store-api.hh21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh
index 46dd261df..072aebc8d 100644
--- a/src/libstore/store-api.hh
+++ b/src/libstore/store-api.hh
@@ -189,8 +189,9 @@ struct ValidPathInfo
Strings shortRefs() const;
+ ValidPathInfo(const StorePath & path) : path(path) { }
+
ValidPathInfo(StorePath && path) : path(std::move(path)) { }
- explicit ValidPathInfo(const ValidPathInfo & other);
virtual ~ValidPathInfo() { }
};
@@ -430,10 +431,6 @@ public:
virtual StorePathSet queryDerivationOutputs(const StorePath & path)
{ unsupported("queryDerivationOutputs"); }
- /* Query the output names of the derivation denoted by `path'. */
- virtual StringSet queryDerivationOutputNames(const StorePath & path)
- { unsupported("queryDerivationOutputNames"); }
-
/* Query the full store path given the hash part of a valid store
path, or empty if the path doesn't exist. */
virtual std::optional<StorePath> queryPathFromHashPart(const std::string & hashPart) = 0;
@@ -450,12 +447,7 @@ public:
/* Import a path into the store. */
virtual void addToStore(const ValidPathInfo & info, Source & narSource,
RepairFlag repair = NoRepair, CheckSigsFlag checkSigs = CheckSigs,
- std::shared_ptr<FSAccessor> accessor = 0);
-
- // FIXME: remove
- virtual void addToStore(const ValidPathInfo & info, const ref<std::string> & nar,
- RepairFlag repair = NoRepair, CheckSigsFlag checkSigs = CheckSigs,
- std::shared_ptr<FSAccessor> accessor = 0);
+ std::shared_ptr<FSAccessor> accessor = 0) = 0;
/* Copy the contents of a path to the store and register the
validity the resulting path. The resulting path is returned.
@@ -592,6 +584,9 @@ public:
ensurePath(). */
Derivation derivationFromPath(const StorePath & drvPath);
+ /* Read a derivation (which must already be valid). */
+ Derivation readDerivation(const StorePath & drvPath);
+
/* Place in `out' the set of all store paths in the file system
closure of `storePath'; that is, all paths than can be directly
or indirectly reached from it. `out' is not cleared. If
@@ -737,10 +732,6 @@ public:
};
-/* Extract the hash part of the given store path. */
-string storePathToHash(const Path & path);
-
-
/* Copy a path from one store to another. */
void copyStorePath(ref<Store> srcStore, ref<Store> dstStore,
const StorePath & storePath, RepairFlag repair = NoRepair, CheckSigsFlag checkSigs = CheckSigs);