xnew: add support for sub package.