#NEWLINE# def _getRecursiveRequirements( self , db , troveList , flavorPath ) : #NEWLINE# #INDENT# seen = set ( ) #NEWLINE# while troveList : #NEWLINE# #INDENT# depSetList = [ ] #NEWLINE# for trv in db . getTroves ( list ( troveList ) , withFiles = False ) : #NEWLINE# #INDENT# required = deps . DependencySet ( ) #NEWLINE# oldRequired = trv . getRequires ( ) #NEWLINE# [ required . addDep ( * x ) for x in oldRequired . iterDeps ( ) if ( x [ 0 ] != deps . AbiDependency ) ] #NEWLINE# depSetList . append ( required ) #NEWLINE# #UNINDENT# seen . update ( troveList ) #NEWLINE# sols = db . getTrovesWithProvides ( depSetList , splitByDep = True ) #NEWLINE# troveList = set ( ) #NEWLINE# for depSetSols in sols . itervalues ( ) : #NEWLINE# #INDENT# for depSols in depSetSols : #NEWLINE# #INDENT# bestChoices = [ ] #NEWLINE# for flavor in flavorPath : #NEWLINE# #INDENT# bestChoices = [ x for x in depSols if flavor . satisfies ( x [ 2 ] ) ] #NEWLINE# if bestChoices : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# #UNINDENT# if bestChoices : #NEWLINE# #INDENT# depSols = set ( bestChoices ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# depSols = set ( depSols ) #NEWLINE# #UNINDENT# depSols . difference_update ( seen ) #NEWLINE# troveList . update ( depSols ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return seen