Copy paths in the right order
This commit is contained in:
parent
58a8b1c91c
commit
8722927c08
|
@ -125,7 +125,7 @@ static void copyClosureTo(std::timed_mutex & sendMutex, ref<Store> destStore,
|
||||||
|
|
||||||
|
|
||||||
// FIXME: use Store::topoSortPaths().
|
// FIXME: use Store::topoSortPaths().
|
||||||
StorePaths topoSortPaths(const std::map<StorePath, ValidPathInfo> & paths)
|
StorePaths reverseTopoSortPaths(const std::map<StorePath, ValidPathInfo> & paths)
|
||||||
{
|
{
|
||||||
StorePaths sorted;
|
StorePaths sorted;
|
||||||
StorePathSet visited;
|
StorePathSet visited;
|
||||||
|
@ -150,8 +150,6 @@ StorePaths topoSortPaths(const std::map<StorePath, ValidPathInfo> & paths)
|
||||||
for (auto & i : paths)
|
for (auto & i : paths)
|
||||||
dfsVisit(i.first);
|
dfsVisit(i.first);
|
||||||
|
|
||||||
std::reverse(sorted.begin(), sorted.end());
|
|
||||||
|
|
||||||
return sorted;
|
return sorted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -468,7 +466,7 @@ void State::buildRemote(ref<Store> destStore,
|
||||||
printMsg(lvlDebug, "copying outputs of ‘%s’ from ‘%s’ (%d bytes)",
|
printMsg(lvlDebug, "copying outputs of ‘%s’ from ‘%s’ (%d bytes)",
|
||||||
localStore->printStorePath(step->drvPath), machine->sshName, totalNarSize);
|
localStore->printStorePath(step->drvPath), machine->sshName, totalNarSize);
|
||||||
|
|
||||||
auto pathsSorted = topoSortPaths(infos);
|
auto pathsSorted = reverseTopoSortPaths(infos);
|
||||||
|
|
||||||
for (auto & path : pathsSorted) {
|
for (auto & path : pathsSorted) {
|
||||||
auto & info = infos.find(path)->second;
|
auto & info = infos.find(path)->second;
|
||||||
|
|
Loading…
Reference in a new issue