Refactor package generation dependencies a little bit.