コード例 #1
0
ファイル: instlClient.py プロジェクト: ynonp/instl
 def needed_by(self, iid):
     try:
         from pyinstl import installItemGraph
         InstallItem.begin_get_for_all_oses()
         graph = installItemGraph.create_dependencies_graph(self.install_definitions_index)
         needed_by_list = installItemGraph.find_needed_by(graph, iid)
         InstallItem.reset_get_for_all_oses()
         return needed_by_list
     except ImportError: # no installItemGraph, no worry
         print("Could not load installItemGraph")
         return None
コード例 #2
0
ファイル: instlInstanceBase.py プロジェクト: ynonp/instl
 def find_cycles(self):
         if not self.install_definitions_index:
             print ("index empty - nothing to check")
         else:
             try:
                 from pyinstl import installItemGraph
                 depend_graph = installItemGraph.create_dependencies_graph(self.install_definitions_index)
                 depend_cycles = installItemGraph.find_cycles(depend_graph)
                 if not depend_cycles:
                     print ("No depend cycles found")
                 else:
                     for cy in depend_cycles:
                         print("depend cycle:", " -> ".join(cy))
                 inherit_graph = installItemGraph.create_inheritItem_graph(self.install_definitions_index)
                 inherit_cycles = installItemGraph.find_cycles(inherit_graph)
                 if not inherit_cycles:
                     print ("No inherit cycles found")
                 else:
                     for cy in inherit_cycles:
                         print("inherit cycle:", " -> ".join(cy))
             except ImportError: # no installItemGraph, no worry
                 print("Could not load installItemGraph")