functions for figuring out a package_id from a resource_id