port to use pkginfo instead of requiring of json