diff --git a/conda_libmamba_solver/state.py b/conda_libmamba_solver/state.py index aaec619f..93acb2c6 100644 --- a/conda_libmamba_solver/state.py +++ b/conda_libmamba_solver/state.py @@ -262,7 +262,7 @@ def virtual(self) -> Mapping[str, MatchSpec]: cannot be (un)installed, they only represent constrains for other packages. By convention, their names start with a double underscore. """ - return MappingProxyType(self._virtual) + return MappingProxyType(dict(sorted(self._virtual.items()))) @property def aggressive_updates(self) -> Mapping[str, MatchSpec]: diff --git a/news/378-sort-installed b/news/378-sort-installed index 3f2cdc78..70ac27df 100644 --- a/news/378-sort-installed +++ b/news/378-sort-installed @@ -4,7 +4,7 @@ ### Bug fixes -* Ensure installed packages are always sorted to avoid injecting accidental randomness in the solve process. (#378) +* Ensure installed and virtual packages are always sorted to avoid injecting accidental randomness in the solve process. (#378) ### Deprecations