Add a Store::addToStore() variant that accepts a NAR

As a side effect, this ensures that signatures are propagated when
copying paths between stores.

Also refactored import/export to make use of this.
This commit is contained in:
Eelco Dolstra 2016-05-04 13:36:54 +02:00
parent b6c768fb6a
commit 538a64e8c3
15 changed files with 235 additions and 338 deletions

View file

@ -108,7 +108,7 @@ void StorePathsCommand::run(ref<Store> store)
PathSet closure;
for (auto & storePath : storePaths)
store->computeFSClosure(storePath, closure, false, false);
storePaths = store->topoSortPaths(closure);
storePaths = Paths(closure.begin(), closure.end());
}
}