#36 Provide error message on depchase failure
Opened 5 months ago by yselkowitz. Modified 4 months ago
yselkowitz/flatpak-module-tools depchase  into  main

@@ -205,7 +205,7 @@ 

      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

+             assert package.explanation is not None, f"{package.name} dependency cannot be resolved, may be missing from runtime"

"{package.name} dependency cannot be resolved" is not an accurate representation here. The package was resolved - the problem is that we can't figure out why it was resolved.

What I suggested on IRC:

"{package} unexpectedly found when resolving dependencies. Maybe the runtime needs to be rebuilt to match the contents of {tagname}?" - I would probably do that with a raise rather than an assert.

I'd also stick to asking for a raise not an assert. Including the tag name will require passing cli_data to collate_packages().

              package.explanation.append(package.name)

  

      return packages

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.

rebased onto e520dcc

5 months ago

"{package.name} dependency cannot be resolved" is not an accurate representation here. The package was resolved - the problem is that we can't figure out why it was resolved.

What I suggested on IRC:

"{package} unexpectedly found when resolving dependencies. Maybe the runtime needs to be rebuilt to match the contents of {tagname}?" - I would probably do that with a raise rather than an assert.

I'd also stick to asking for a raise not an assert. Including the tag name will require passing cli_data to collate_packages().

Metadata