diff --git a/conda_libmamba_solver/solver.py b/conda_libmamba_solver/solver.py index d6b52f9b..ab2a911d 100644 --- a/conda_libmamba_solver/solver.py +++ b/conda_libmamba_solver/solver.py @@ -640,6 +640,9 @@ def _parse_problems(cls, problems: str) -> Mapping[str, MatchSpec]: pin_b = words[5].rsplit("-", 1)[0] conflicts.append(MatchSpec(pin_a)) conflicts.append(MatchSpec(pin_b)) + elif "is excluded by strict repo priority" in line: + # package python-3.7.6-h0371630_2 is excluded by strict repo priority + conflicts.append(cls._str_to_matchspec(words[2])) else: log.debug("! Problem line not recognized: %s", line) @@ -712,6 +715,10 @@ def _prepare_problems_message(self, pins=None): # This error makes 'explain_problems()' crash. Anticipate. log.info("Failed to explain problems. Unsupported request.") return legacy_errors + if "is excluded by strict repo priority" in legacy_errors: + # This will cause a lot of warnings until implemented in detail explanations + log.info("Skipping error explanation. Excluded by strict repo priority.") + return legacy_errors try: explained_errors = self.solver.explain_problems() except Exception as exc: diff --git a/news/343-excluded-strict-priority b/news/343-excluded-strict-priority new file mode 100644 index 00000000..eecf9389 --- /dev/null +++ b/news/343-excluded-strict-priority @@ -0,0 +1,19 @@ +### Enhancements + +* + +### Bug fixes + +* Interpret "excluded by strict priority" solver errors as proper satisfiability conflicts and avoid printing related yet uninformative warnings. (#343) + +### Deprecations + +* + +### Docs + +* + +### Other + +*