getAllPackages take in account all the transitive dependencies