aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/store-api.hh
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2020-06-19 14:48:57 -0400
committerMatthew Bauer <mjbauer95@gmail.com>2020-06-19 14:48:57 -0400
commit0c9c1b8826395a9023606cd7749aa16ef6771941 (patch)
treefeaf347b41e6a18d6c3ab8990ceda437e697dc61 /src/libstore/store-api.hh
parent7e11cf339988a1b44bbd59377de2a1585387ac83 (diff)
Return map of StorePaths in copyPaths
This allows the caller to know what values were actually added to the store.
Diffstat (limited to 'src/libstore/store-api.hh')
-rw-r--r--src/libstore/store-api.hh17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh
index fd3652588..2b12879e3 100644
--- a/src/libstore/store-api.hh
+++ b/src/libstore/store-api.hh
@@ -444,8 +444,9 @@ public:
virtual StorePathSet querySubstitutablePaths(const StorePathSet & paths) { return {}; };
/* Query substitute info (i.e. references, derivers and download
- sizes) of a set of paths. If a path does not have substitute
- info, it's omitted from the resulting ‘infos’ map. */
+ sizes) of a map of paths to their optional ca values. If a path
+ does not have substitute info, it's omitted from the resulting
+ ‘infos’ map. */
virtual void querySubstitutablePathInfos(const StorePathCAMap & paths,
SubstitutablePathInfos & infos) { return; };
@@ -743,11 +744,13 @@ void copyStorePath(ref<Store> srcStore, ref<Store> dstStore,
/* Copy store paths from one store to another. The paths may be copied
- in parallel. They are copied in a topologically sorted order
- (i.e. if A is a reference of B, then A is copied before B), but
- the set of store paths is not automatically closed; use
- copyClosure() for that. */
-void copyPaths(ref<Store> srcStore, ref<Store> dstStore, const StorePathSet & storePaths,
+ in parallel. They are copied in a topologically sorted order (i.e.
+ if A is a reference of B, then A is copied before B), but the set
+ of store paths is not automatically closed; use copyClosure() for
+ that. Returns a map of what each path was copied to the dstStore
+ as. */
+std::map<StorePath, StorePath> copyPaths(ref<Store> srcStore, ref<Store> dstStore,
+ const StorePathSet & storePaths,
RepairFlag repair = NoRepair,
CheckSigsFlag checkSigs = CheckSigs,
SubstituteFlag substitute = NoSubstitute);