Pkg fixes

trying to join all efforts for solving the pkg issues.

still working on a docker based test
This is already merged, is it not?