def _preflight_check(desired, fromrepo, **kwargs):
 if ('pkg.check_db' not in __salt__):
  return {}
 ret = {'suggest': {}, 'no_suggest': []}
 pkginfo = __salt__['pkg.check_db'](fromrepo=fromrepo, *list(desired.keys()), **kwargs)
 for pkgname in pkginfo:
  if (pkginfo[pkgname]['found'] is False):
   if pkginfo[pkgname]['suggestions']:
    ret['suggest'][pkgname] = pkginfo[pkgname]['suggestions']
   else:
    ret['no_suggest'].append(pkgname)
 return ret

def _preflight_check ( desired , fromrepo , ** kwargs ) : if ( 'pkg.check_db' not in __salt__ ) : return { } ret = { 'suggest' : { } , 'no_suggest' : [ ] } pkginfo = __salt__ [ 'pkg.check_db' ] ( fromrepo = fromrepo , * list ( desired . keys ( ) ) , ** kwargs ) for pkgname in pkginfo : if ( pkginfo [ pkgname ] [ 'found' ] is False ) : if pkginfo [ pkgname ] [ 'suggestions' ] : ret [ 'suggest' ] [ pkgname ] = pkginfo [ pkgname ] [ 'suggestions' ] else : ret [ 'no_suggest' ] . append ( pkgname ) return ret
perform platform-specific checks on desired packages .