gnome module: fix invalid find_tool variable contents causing crash #12479
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If a tool that is looked up in a .pc file is supposed to be there and has a pkg-config variable entry, but the value is incorrect, we can't actually use it.
Since commit ab3d020 we actually do run the ExternalProgram search procedure on it though -- which caused it to go wonky and return a None if it doesn't exist, instead of containing a path to a program that does not exist and fails at build time. This is better in the case where searching helps resolve .exe file extensions -- and worse in the case where patches to the dependency means nothing we do is ever enough to actually find what is expected, since now we crash.
Raise an explicit error in such a case, pointing out that the dependency itself is broken and needs a distributor-side resolution.
Fixes #12412