server/msplanner.py
branchstable
changeset 6129 fea746b60093
parent 6128 fbb8398f80dc
child 6131 087c5a168010
equal deleted inserted replaced
6128:fbb8398f80dc 6129:fea746b60093
   437                 # or if some source has it listed in its cross_relations
   437                 # or if some source has it listed in its cross_relations
   438                 # attribute
   438                 # attribute
   439                 #
   439                 #
   440                 # XXX code below don't deal if some source allow relation
   440                 # XXX code below don't deal if some source allow relation
   441                 #     crossing but not another one
   441                 #     crossing but not another one
   442                 relsources = repo.rel_type_sources(rel.r_type)
   442                 relsources = [s for s in repo.rel_type_sources(rel.r_type)
       
   443                                if s is self.system_source
       
   444                                or s in self._sourcesterms]
   443                 if len(relsources) < 2:
   445                 if len(relsources) < 2:
   444                     # filter out sources being there because they have this
   446                     # filter out sources being there because they have this
   445                     # relation in their dont_cross_relations attribute
   447                     # relation in their dont_cross_relations attribute
   446                     relsources = [source for source in relsources
   448                     relsources = [source for source in relsources
   447                                   if source.support_relation(rel.r_type)]
   449                                   if source.support_relation(rel.r_type)]
  1211                 # treated or if this is the last shot for used solutions
  1213                 # treated or if this is the last shot for used solutions
  1212                 minrqlst, insertedvars = vfilter.filter(
  1214                 minrqlst, insertedvars = vfilter.filter(
  1213                     sources, terms, scope, solindices, needsel, final)
  1215                     sources, terms, scope, solindices, needsel, final)
  1214                 if final:
  1216                 if final:
  1215                     solsinputmaps = ppi.merge_input_maps(solindices)
  1217                     solsinputmaps = ppi.merge_input_maps(solindices)
       
  1218                     if len(solsinputmaps) > 1:
       
  1219                         refrqlst = minrqlst
  1216                     for solindices, inputmap in solsinputmaps:
  1220                     for solindices, inputmap in solsinputmaps:
  1217                         if inputmap is None:
  1221                         if inputmap is None:
  1218                             inputmap = subinputmap
  1222                             inputmap = subinputmap
  1219                         else:
  1223                         else:
  1220                             inputmap.update(subinputmap)
  1224                             inputmap.update(subinputmap)
       
  1225                         if len(solsinputmaps) > 1:
       
  1226                             minrqlst = refrqlst.copy()
       
  1227                             sources = sources[:]
  1221                         if inputmap and len(sources) > 1:
  1228                         if inputmap and len(sources) > 1:
  1222                             sources.remove(ppi.system_source)
  1229                             sources.remove(ppi.system_source)
  1223                             steps.append(ppi.build_final_part(minrqlst, solindices, None,
  1230                             steps.append(ppi.build_final_part(minrqlst, solindices, None,
  1224                                                               sources, insertedvars))
  1231                                                               sources, insertedvars))
  1225                             steps.append(ppi.build_final_part(minrqlst, solindices, inputmap,
  1232                             steps.append(ppi.build_final_part(minrqlst, solindices, inputmap,