def depth_first_topo_graph(graph, start, visited=[], sorted_nodes=[]):
visited = visited + [start]
if start not in graph:
- raise src.SatException('Error in product dependencies : %s product is referenced in products dependencies but is not present in the application !' % start)
+ # get more explicit error
+ where = [k for k in graph if start in graph[k]]
+ raise src.SatException('Error in product dependencies : %s product is referenced in products dependencies, but is not present in the application, from %s' % (start, where))
+ # may be in debug mode, continue loop to get all problems, (if comment raise)
+ # print("WARNING : %s product is referenced in products dependencies but is not present in the application, from %s" % (start, where))
+ # sorted_nodes = sorted_nodes + [start]
+ # return visited, sorted_nodes
for node in graph[start]:
if node not in visited:
visited,sorted_nodes=depth_first_topo_graph(graph, node, visited,sorted_nodes)
else:
if node not in sorted_nodes:
- raise src.SatException('Error in product dependencies : cycle detection for node %s and %s !' % (start,node))
+ raise src.SatException('Error in product dependencies : cycle detection for node %s and %s' % (start,node))
sorted_nodes = sorted_nodes + [start]
- return visited,sorted_nodes
+ return visited, sorted_nodes
# check for p_name that all dependencies are installed
def show_last_logs(logger, config, log_dirs):
"""Show last compilation logs"""
log_dir = os.path.join(config.APPLICATION.workdir, 'LOGS')
+ sorted_log_dirs = sorted(log_dirs)
# list the logs
nb = len(log_dirs)
nb_cols = 4
for i in range(0, nb_cols):
k = index + i * col_size
if k < nb:
- l = log_dirs[k]
+ l = sorted_log_dirs[k]
str_indice = src.printcolors.printcLabel("%2d" % (k+1))
log_name = l
logger.write("%s: %-30s" % (str_indice, log_name), 1, False)
while (x < 0):
x = ask_value(nb)
if x > 0:
- product_log_dir = os.path.join(log_dir, log_dirs[x-1])
+ product_log_dir = os.path.join(log_dir, sorted_log_dirs[x-1])
show_product_last_logs(logger, config, product_log_dir)
def show_product_last_logs(logger, config, product_log_dir):
_debug = [False] #support push/pop for temporary activate debug outputs
# wambeke is christian at home
-_developers = ["christian", "wambeke"]
+_developers = ["xchristian", "xwambeke"]
def isDeveloper():