reverted to ensure_packages