the package manager part should have good "machine" interface to allowit's usage in various scripts and other build systems. and buildsystem... oh, well, it can simply use package manager. this way we can discuss "dub-pkg" and "dub-build" as separate entities, and flaws of oneproject will not automatically propagate on another project.
The machine interface is "dub describe". It's JSON, so... that's what my Emacs package uses to pass -I flags to dmd for on-the-fly syntax checks.
Atila