diff --git a/conda_libmamba_solver/state.py b/conda_libmamba_solver/state.py index ab59150c..aaec619f 100644 --- a/conda_libmamba_solver/state.py +++ b/conda_libmamba_solver/state.py @@ -233,7 +233,7 @@ def installed(self) -> Mapping[str, PackageRecord]: can generate an equivalent ``MatchSpec`` object with ``.to_match_spec()``. Records are toposorted. """ - return MappingProxyType({pkg.name: pkg for pkg in self.prefix_data.iter_records_sorted()}) + return MappingProxyType(dict(sorted(self.prefix_data._prefix_records.items()))) @property def history(self) -> Mapping[str, MatchSpec]: diff --git a/news/378-sort-installed b/news/378-sort-installed index daec3838..3f2cdc78 100644 --- a/news/378-sort-installed +++ b/news/378-sort-installed @@ -4,7 +4,7 @@ ### Bug fixes -* Ensure installed packages are always topologically sorted to avoid injecting accidental randomness in the solve process. (#378) +* Ensure installed packages are always sorted to avoid injecting accidental randomness in the solve process. (#378) ### Deprecations