#55404Extract package dependency sorting to own class
Description
The Package Manager got pretty big due to the custom dependency resolving algorithm of CMS.
This part should be extracted to its own class in order to increase testability and reduce complexity.