From 18c2cf9263afd4f3f9ef2f11c60012470c7058af Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Jun 10 2024 17:42:10 +0000 Subject: Provide error message on depchase failure This assertion was triggered after F39 final freeze lifted, and one of the many updates included the splitting out of a -libs subpackage from a runtime dependency. At least in that case, the solution is to update the runtime, but without a message it is difficult to debug. --- diff --git a/flatpak_module_tools/depchase/cli.py b/flatpak_module_tools/depchase/cli.py index 2c8e065..4d4170a 100644 --- a/flatpak_module_tools/depchase/cli.py +++ b/flatpak_module_tools/depchase/cli.py @@ -205,7 +205,10 @@ def collate_packages( for package in packages.values(): if not requested_packages or package.name not in requested_packages: package.explanation = get_explanation(package.name) - assert package.explanation is not None + if not package.explanation: + raise RuntimeError( + f"{package.name} dependency cannot be resolved, may be missing from runtime" + ) package.explanation.append(package.name) return packages