Skip to content

Commit

Permalink
Fix lockfiles topological sort (#2616)
Browse files Browse the repository at this point in the history
* Fix env export --explicit topological sort

* Leave note for sorting explicit specs
  • Loading branch information
AntoinePrv authored Jun 23, 2023
1 parent 5bd15a1 commit c9770b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libmamba/src/core/prefix_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ namespace mamba
const auto from_iter = name_to_node_id.find(ms.name);
if (from_iter != name_to_node_id.cend())
{
dep_graph.add_edge(to_id, from_iter->second);
dep_graph.add_edge(from_iter->second, to_id);
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions libmamba/src/core/transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ namespace mamba
m_transaction = std::make_unique<solv::ObjTransaction>(
solv::ObjTransaction::from_solvables(m_pool.pool(), decision)
);
// We cannot order the transcation here because we do no have dependency information
// from the lockfile
// TODO reload dependency information from ``ctx.target_prefix / "conda-meta"`` after
// ``fetch_extract_packages`` is called.
init();

for (auto& s : specs_to_remove)
Expand Down

0 comments on commit c9770b1

Please sign in to comment.