Use pkg.list_pkgs function to determine package state

PROD-32474

Change-Id: I831f00304bc827ad8e84f907304fd25909c98d28
1 file changed