Fix bug DNN-5017: use view state to save the package info.