To add to that, the dependency may be a specific version or it may be that version or higher. So once you know what the dependencies are, you have to check on version and make sure that you have an appropriate version.
That then becomes recursive, since the dependencies may in turn have their own dependencies. …
So the end goal is: A set of packages where each package is by definition a specific version, and every package’s dependencies are correctly met - and then, you know, everything actually works i.e. you have to integration test the release.
The first part of that is kind of automated in the sense that you will get errors installing if dependencies aren’t met. That doesn’t necessarily help you to fix the problem though.