def list_upgrades(refresh=True, **kwargs):
 if salt.utils.is_true(refresh):
  refresh_db()
 upgrades = {}
 lines = __salt__['cmd.run_stdout']('/opt/csw/bin/pkgutil -A --parse').splitlines()
 for line in lines:
  comps = line.split(' DCTB ')
  if (comps[2] == 'SAME'):
   continue
  if (comps[2] == 'not installed'):
   continue
  upgrades[comps[0]] = comps[1]
 return upgrades

def list_upgrades ( refresh = True , ** kwargs ) : if salt . utils . is_true ( refresh ) : refresh_db ( ) upgrades = { } lines = __salt__ [ 'cmd.run_stdout' ] ( '/opt/csw/bin/pkgutil -A --parse' ) . splitlines ( ) for line in lines : comps = line . split ( ' DCTB ' ) if ( comps [ 2 ] == 'SAME' ) : continue if ( comps [ 2 ] == 'not installed' ) : continue upgrades [ comps [ 0 ] ] = comps [ 1 ] return upgrades
list all available package upgrades on this system cli example: .