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