issue #2404:Add more functions to Deprecated.lua and modify some .pkg files