'How do we make sure that the dependency package specified as pkg_deps is started as a service before the main service

I have 2 habitat packages say A and B. Both have init and run hooks defined. A is specified as a dependency in the plan.sh of B like pkgs_deps='A'. Now, I want to make sure that when I deploy and start B, A should automatically be deployed and run. However, I have noticed that though it A is being deployed but the init and run hook were not called until I do hab start A.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source