3 # Copyright (C) 2010-2012 CEA/DEN
5 # This library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License.
10 # This library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with this library; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 import src.debug as DBG
25 # Compatibility python 2/3 for input function
26 # input stays input for python 3 and input = raw_input for python 2
33 # Define all possible option for the compile command : sat compile <options>
34 parser = src.options.Options()
35 parser.add_option('p', 'products', 'list2', 'products',
36 _('Optional: products to compile. This option accepts a comma separated list.'))
37 parser.add_option('f', 'force', 'boolean', 'force',
38 'Optional: force the compilation of product, even if it is already installed. The BUILD directory is cleaned before compilation.')
39 parser.add_option('u', 'update', 'boolean', 'update',
40 'Optional: update mode, compile only products which sources has changed, including the dependencies.')
41 parser.add_option('', 'with_fathers', 'boolean', 'fathers',
42 _("Optional: build all necessary products to the given product (KERNEL is "
43 "build before building GUI)."), False)
44 parser.add_option('', 'with_children', 'boolean', 'children',
45 _("Optional: build all products using the given product (all SMESH plugins"
46 " are build after SMESH)."), False)
47 parser.add_option('', 'clean_all', 'boolean', 'clean_all',
48 _("Optional: clean BUILD dir and INSTALL dir before building product."),
50 parser.add_option('', 'clean_install', 'boolean', 'clean_install',
51 _("Optional: clean INSTALL dir before building product."), False)
52 parser.add_option('', 'make_flags', 'string', 'makeflags',
53 _("Optional: add extra options to the 'make' command."))
54 parser.add_option('', 'show', 'boolean', 'no_compile',
55 _("Optional: DO NOT COMPILE just show if products are installed or not."),
57 parser.add_option('', 'stop_first_fail', 'boolean', 'stop_first_fail', _(
58 "Optional: Stops the command at first product compilation"
60 parser.add_option('', 'check', 'boolean', 'check', _(
61 "Optional: execute the unit tests after compilation"), False)
63 parser.add_option('', 'clean_build_after', 'boolean', 'clean_build_after',
64 _('Optional: remove the build directory after successful compilation'), False)
67 # from sat product infos, represent the product dependencies in a simple python graph
68 # keys are nodes, the list of dependencies are values
69 def get_dependencies_graph(p_infos, compile_time=True):
71 for (p_name,p_info) in p_infos:
73 for d in p_info.depend:
75 if compile_time and "build_depend" in p_info:
76 for d in p_info.build_depend:
81 # this recursive function calculates all the dependencies of node start
82 def depth_search_graph(graph, start, visited=[]):
83 visited= visited+ [start]
84 for node in graph[start]: # for all nodes in start dependencies
85 if node not in visited:
86 visited=depth_search_graph(graph, node, visited)
89 # find a path from start node to end (a group of nodes)
90 def find_path_graph(graph, start, end, path=[]):
94 if start not in graph:
96 for node in graph[start]:
98 newpath = find_path_graph(graph, node, end, path)
99 if newpath: return newpath
102 # Topological sorting algo
103 # return in sorted_nodes the list of sorted nodes
104 def depth_first_topo_graph(graph, start, visited=[], sorted_nodes=[]):
105 visited = visited + [start]
106 if start not in graph:
107 raise src.SatException('Error in product dependencies : %s product is referenced in products dependencies but is not present in the application !' % start)
108 for node in graph[start]:
109 if node not in visited:
110 visited,sorted_nodes=depth_first_topo_graph(graph, node, visited,sorted_nodes)
112 if node not in sorted_nodes:
113 raise src.SatException('Error in product dependencies : cycle detection for node %s and %s !' % (start,node))
115 sorted_nodes = sorted_nodes + [start]
116 return visited,sorted_nodes
119 # check for p_name that all dependencies are installed
120 def check_dependencies(config, p_name_p_info, all_products_dict):
121 l_depends_not_installed = []
122 for prod in p_name_p_info[1]["depend_all"]:
123 # for each dependency, check the install
124 prod_name, prod_info=all_products_dict[prod]
125 if not(src.product.check_installation(config, prod_info)):
126 l_depends_not_installed.append(prod_name)
127 return l_depends_not_installed # non installed deps
129 def log_step(logger, header, step):
130 logger.write("\r%s%s" % (header, " " * 30), 3)
131 logger.write("\r%s%s" % (header, step), 3)
134 def log_res_step(logger, res):
136 logger.write("%s \n" % src.printcolors.printcSuccess("OK"), 4)
139 logger.write("%s \n" % src.printcolors.printcError("KO"), 4)
142 def compile_all_products(sat, config, options, products_infos, all_products_dict, all_products_graph, logger):
143 '''Execute the proper configuration commands
144 in each product build directory.
146 :param config Config: The global configuration
147 :param products_info list: List of
148 (str, Config) => (product_name, product_info)
149 :param all_products_dict: Dict of all products
150 :param all_products_graph: graph of all products
151 :param logger Logger: The logger instance to use for the display and logging
152 :return: the number of failing commands.
155 # first loop for the cleaning
156 check_salome_configuration=False
158 for p_name_info in products_infos:
160 p_name, p_info = p_name_info
161 if src.product.product_is_salome(p_info):
162 check_salome_configuration=True
164 # nothing to clean for native or fixed products
165 if (not src.product.product_compiles(p_info)) or\
166 src.product.product_is_native(p_info) or\
167 src.product.product_is_fixed(p_info):
170 # Clean the build and the install directories
171 # if the corresponding options was called
172 if options.clean_all:
173 sat.clean(config.VARS.application +
174 " --products " + p_name +
175 " --build --install",
178 logger_add_link = logger)
181 # Clean the the install directory
182 # if the corresponding option was called
183 if options.clean_install:
184 sat.clean(config.VARS.application +
185 " --products " + p_name +
189 logger_add_link = logger)
191 # Clean the the install directory
192 # if the corresponding option was called
194 sat.clean(config.VARS.application +
195 " --products " + p_name +
199 logger_add_link = logger)
204 if len(updated_products)>0:
205 # if other products where updated, check that the current product is a child
206 # in this case it will be also updated
207 if find_path_graph(all_products_graph, p_name, updated_products):
208 logger.write("\nUpdate product %s (child)" % p_name, 5)
211 source_time=os.path.getatime(p_info.source_dir)
212 install_time=os.path.getatime(p_info.install_dir)
213 if install_time<source_time:
214 logger.write("\nupdate product %s" % p_name, 5)
217 updated_products.append(p_name)
218 sat.clean(config.VARS.application +
219 " --products " + p_name +
220 " --build --install",
223 logger_add_link = logger)
227 if check_salome_configuration:
228 # For salome applications, we check if the sources of configuration modules are present
229 # configuration modules have the property "configure_dependency"
230 # they are implicit prerequisites of the compilation.
233 # get the list of all modules in application
234 all_products_infos = src.product.get_products_infos(config.APPLICATION.products,
237 # for configuration modules, check if sources are present
238 for prod in all_products_dict:
239 product_name, product_info = all_products_dict[prod]
240 if ("properties" in product_info and
241 "configure_dependency" in product_info.properties and
242 product_info.properties.configure_dependency == "yes"):
243 check_source = check_source and src.product.check_source(product_info)
245 logger.write(_("\nERROR : SOURCES of %s not found! It is required for"
246 " the configuration\n" % product_name))
247 logger.write(_(" Get it with the command : sat prepare %s -p %s \n" %
248 (config.APPLICATION.name, product_name)))
251 return res # error configure dependency : we stop the compilation
253 # second loop to compile
255 for p_name_info in products_infos:
257 p_name, p_info = p_name_info
261 header = _("Compilation of %s") % src.printcolors.printcLabel(p_name)
262 header += " %s " % ("." * (len_end_line - len(p_name)))
263 logger.write(header, 3)
266 # Do nothing if the product is not compilable
267 if not src.product.product_compiles(p_info):
268 log_step(logger, header, "ignored")
269 logger.write("\n", 3, False)
272 # Do nothing if the product is native
273 if src.product.product_is_native(p_info):
274 log_step(logger, header, "native")
275 logger.write("\n", 3, False)
278 # Do nothing if the product is fixed (already compiled by third party)
279 if src.product.product_is_fixed(p_info):
280 log_step(logger, header, "native")
281 logger.write("\n", 3, False)
285 # Recompute the product information to get the right install_dir
286 # (it could change if there is a clean of the install directory)
287 p_info = src.product.get_product_config(config, p_name)
289 # Check if sources was already successfully installed
290 check_source = src.product.check_source(p_info)
291 is_pip= (src.appli_test_property(config,"pip", "yes") and src.product.product_test_property(p_info,"pip", "yes"))
292 # don't check sources with option --show
293 # or for products managed by pip (there sources are in wheels stored in LOCAL.ARCHIVE
294 if not (options.no_compile or is_pip):
296 logger.write(_("Sources of product not found (try 'sat -h prepare') \n"))
297 res += 1 # one more error
300 # if we don't force compilation, check if the was already successfully installed.
301 # we don't compile in this case.
302 if (not options.force) and src.product.check_installation(config, p_info):
303 logger.write(_("Already installed"))
304 logger.write(_(" in %s" % p_info.install_dir), 4)
305 logger.write(_("\n"))
308 # If the show option was called, do not launch the compilation
309 if options.no_compile:
310 logger.write(_("Not installed in %s\n" % p_info.install_dir))
313 # Check if the dependencies are installed
314 l_depends_not_installed = check_dependencies(config, p_name_info, all_products_dict)
315 if len(l_depends_not_installed) > 0:
316 log_step(logger, header, "")
317 logger.write(src.printcolors.printcError(
318 _("ERROR : the following mandatory product(s) is(are) not installed: ")))
319 for prod_name in l_depends_not_installed:
320 logger.write(src.printcolors.printcError(prod_name + " "))
324 # Call the function to compile the product
325 res_prod, len_end_line, error_step = compile_product(
326 sat, p_name_info, config, options, logger, header, len_end_line)
330 # there was an error, we clean install dir, unless :
331 # - the error step is "check", or
332 # - the product is managed by pip and installed in python dir
333 do_not_clean_install=False
334 is_single_dir=(src.appli_test_property(config,"single_install_dir", "yes") and \
335 src.product.product_test_property(p_info,"single_install_dir", "yes"))
337 if (error_step == "CHECK") or (is_pip and src.appli_test_property(config,"pip_install_dir", "python")) or is_single_dir :
338 # cases for which we do not want to remove install dir
339 # for is_single_dir and is_pip, the test to determine if the product is already
340 # compiled is based on configuration file, not the directory
341 do_not_clean_install=True
343 if not do_not_clean_install:
344 # Clean the install directory if there is any
346 "Cleaning the install directory if there is any\n"),
348 sat.clean(config.VARS.application +
349 " --products " + p_name +
353 logger_add_link = logger)
355 # Clean the build directory if the compilation and tests succeed
356 if options.clean_build_after:
357 log_step(logger, header, "CLEAN BUILD")
358 sat.clean(config.VARS.application +
359 " --products " + p_name +
363 logger_add_link = logger)
367 logger.write("\r%s%s" % (header, " " * len_end_line), 3)
368 logger.write("\r" + header + src.printcolors.printcError("KO ") + error_step)
369 logger.write("\n==== %(KO)s in compile of %(name)s \n" %
370 { "name" : p_name , "KO" : src.printcolors.printcInfo("ERROR")}, 4)
371 if error_step == "CHECK":
372 logger.write(_("\nINSTALL directory = %s" %
373 src.printcolors.printcInfo(p_info.install_dir)), 3)
376 logger.write("\r%s%s" % (header, " " * len_end_line), 3)
377 logger.write("\r" + header + src.printcolors.printcSuccess("OK"))
378 logger.write(_("\nINSTALL directory = %s" %
379 src.printcolors.printcInfo(p_info.install_dir)), 3)
380 logger.write("\n==== %s \n" % src.printcolors.printcInfo("OK"), 4)
381 logger.write("\n==== Compilation of %(name)s %(OK)s \n" %
382 { "name" : p_name , "OK" : src.printcolors.printcInfo("OK")}, 4)
384 logger.write("\n", 3, False)
387 if res_prod != 0 and options.stop_first_fail:
392 def compile_product(sat, p_name_info, config, options, logger, header, len_end):
393 '''Execute the proper configuration command(s)
394 in the product build directory.
396 :param p_name_info tuple: (str, Config) => (product_name, product_info)
397 :param config Config: The global configuration
398 :param logger Logger: The logger instance to use for the display
400 :param header Str: the header to display when logging
401 :param len_end Int: the lenght of the the end of line (used in display)
402 :return: 1 if it fails, else 0.
406 p_name, p_info = p_name_info
408 # Get the build procedure from the product configuration.
410 # build_sources : autotools -> build_configure, configure, make, make install
411 # build_sources : cmake -> cmake, make, make install
412 # build_sources : script -> script executions
416 # check if pip should be used : the application and product have pip property
417 if (src.appli_test_property(config,"pip", "yes") and
418 src.product.product_test_property(p_info,"pip", "yes")):
419 res, len_end_line, error_step = compile_product_pip(sat,
427 if (src.product.product_is_autotools(p_info) or
428 src.product.product_is_cmake(p_info)):
429 res, len_end_line, error_step = compile_product_cmake_autotools(sat,
436 if src.product.product_has_script(p_info):
437 res, len_end_line, error_step = compile_product_script(sat,
445 # Check that the install directory exists
446 if res==0 and not(os.path.exists(p_info.install_dir)):
448 error_step = "NO INSTALL DIR"
449 msg = _("Error: despite the fact that all the steps ended successfully,"
450 " no install directory was found !")
451 logger.write(src.printcolors.printcError(msg), 4)
452 logger.write("\n", 4)
453 return res, len_end, error_step
455 # Add the config file corresponding to the dependencies/versions of the
456 # product that have been successfully compiled
458 logger.write(_("Add the config file in installation directory\n"), 5)
459 src.product.add_compile_config_file(p_info, config)
462 # Do the unit tests (call the check command)
463 log_step(logger, header, "CHECK")
464 res_check = sat.check(
465 config.VARS.application + " --products " + p_name,
467 logger_add_link = logger)
473 return res, len_end_line, error_step
476 def compile_product_pip(sat,
483 '''Execute the proper build procedure for pip products
484 :param p_name_info tuple: (str, Config) => (product_name, product_info)
485 :param config Config: The global configuration
486 :param logger Logger: The logger instance to use for the display
488 :param header Str: the header to display when logging
489 :param len_end Int: the lenght of the the end of line (used in display)
490 :return: 1 if it fails, else 0.
493 # pip needs openssl-dev. If openssl is declared in the application, we check it!
494 if "openssl" in config.APPLICATION.products:
495 openssl_cfg = src.product.get_product_config(config, "openssl")
496 if not src.product.check_installation(config, openssl_cfg):
497 raise src.SatException(_("please install system openssl development package, it is required for products managed by pip."))
499 p_name, p_info = p_name_info
502 pip_install_in_python=False
503 pip_wheels_dir=os.path.join(config.LOCAL.archive_dir,"wheels")
504 pip_install_cmd=config.INTERNAL.command.pip_install # parametrized in src/internal
506 # b) get the build environment (useful to get the installed python & pip3)
507 build_environ = src.environment.SalomeEnviron(config,
508 src.environment.Environ(dict(os.environ)),
510 environ_info = src.product.get_product_dependencies(config,
512 build_environ.silent = (config.USER.output_verbose_level < 5)
513 build_environ.set_full_environ(logger, environ_info)
515 # c- download : check/get pip wheel in pip_wheels_dir
516 pip_download_cmd=config.INTERNAL.command.pip_download +\
517 " --destination-directory %s --no-deps %s==%s " %\
518 (pip_wheels_dir, p_info.name, p_info.version)
519 logger.write("\n"+pip_download_cmd+"\n", 4, False)
520 res_pip_dwl = (subprocess.call(pip_download_cmd,
522 cwd=config.LOCAL.workdir,
523 env=build_environ.environ.environ,
524 stdout=logger.logTxtFile,
525 stderr=subprocess.STDOUT) == 0)
526 # error is not managed at the stage. error will be handled by pip install
527 # here we just print a message
529 logger.write("Error in pip download\n", 4, False)
532 # d- install (in python or in separate product directory)
533 if src.appli_test_property(config,"pip_install_dir", "python"):
534 # pip will install product in python directory"
535 pip_install_cmd+=" --find-links=%s --build %s %s==%s" %\
536 (pip_wheels_dir, p_info.build_dir, p_info.name, p_info.version)
537 pip_install_in_python=True
540 # pip will install product in product install_dir
541 pip_install_dir=os.path.join(p_info.install_dir, "lib", "python${PYTHON_VERSION:0:3}", "site-packages")
542 pip_install_cmd+=" --find-links=%s --build %s --target %s %s==%s" %\
543 (pip_wheels_dir, p_info.build_dir, pip_install_dir, p_info.name, p_info.version)
544 log_step(logger, header, "PIP")
545 logger.write("\n"+pip_install_cmd+"\n", 4)
546 len_end_line = len_end + 3
549 res_pip = (subprocess.call(pip_install_cmd,
551 cwd=config.LOCAL.workdir,
552 env=build_environ.environ.environ,
553 stdout=logger.logTxtFile,
554 stderr=subprocess.STDOUT) == 0)
558 #log_res_step(logger, res)
561 logger.write("\nError in pip command, please consult details with sat log command's internal traces\n", 3)
563 return res, len_end_line, error_step
567 def compile_product_cmake_autotools(sat,
574 '''Execute the proper build procedure for autotools or cmake
575 in the product build directory.
577 :param p_name_info tuple: (str, Config) => (product_name, product_info)
578 :param config Config: The global configuration
579 :param logger Logger: The logger instance to use for the display
581 :param header Str: the header to display when logging
582 :param len_end Int: the lenght of the the end of line (used in display)
583 :return: 1 if it fails, else 0.
586 p_name, p_info = p_name_info
588 # Execute "sat configure", "sat make" and "sat install"
592 # Logging and sat command call for configure step
593 len_end_line = len_end
594 log_step(logger, header, "CONFIGURE")
595 res_c = sat.configure(config.VARS.application + " --products " + p_name,
597 logger_add_link = logger)
598 log_res_step(logger, res_c)
602 error_step = "CONFIGURE"
604 # Logging and sat command call for make step
605 # Logging take account of the fact that the product has a compilation
607 if src.product.product_has_script(p_info):
608 # if the product has a compilation script,
609 # it is executed during make step
610 scrit_path_display = src.printcolors.printcLabel(
611 p_info.compil_script)
612 log_step(logger, header, "SCRIPT " + scrit_path_display)
613 len_end_line = len(scrit_path_display)
615 log_step(logger, header, "MAKE")
616 make_arguments = config.VARS.application + " --products " + p_name
617 # Get the make_flags option if there is any
618 if options.makeflags:
619 make_arguments += " --option -j" + options.makeflags
620 res_m = sat.make(make_arguments,
622 logger_add_link = logger)
623 log_res_step(logger, res_m)
629 # Logging and sat command call for make install step
630 log_step(logger, header, "MAKE INSTALL")
631 res_mi = sat.makeinstall(config.VARS.application +
635 logger_add_link = logger)
637 log_res_step(logger, res_mi)
641 error_step = "MAKE INSTALL"
643 return res, len_end_line, error_step
645 def compile_product_script(sat,
652 '''Execute the script build procedure in the product build directory.
654 :param p_name_info tuple: (str, Config) => (product_name, product_info)
655 :param config Config: The global configuration
656 :param logger Logger: The logger instance to use for the display
658 :param header Str: the header to display when logging
659 :param len_end Int: the lenght of the the end of line (used in display)
660 :return: 1 if it fails, else 0.
663 p_name, p_info = p_name_info
665 # Execute "sat configure", "sat make" and "sat install"
668 # Logging and sat command call for the script step
669 scrit_path_display = src.printcolors.printcLabel(p_info.compil_script)
670 log_step(logger, header, "SCRIPT " + scrit_path_display)
671 len_end_line = len_end + len(scrit_path_display)
672 res = sat.script(config.VARS.application + " --products " + p_name,
674 logger_add_link = logger)
675 log_res_step(logger, res)
677 return res, len_end_line, error_step
681 '''method that is called when salomeTools is called with --help option.
683 :return: The text to display for the compile command description.
686 return _("The compile command constructs the products of the application"
687 "\n\nexample:\nsat compile SALOME-master --products KERNEL,GUI,"
688 "MEDCOUPLING --clean_all")
690 def run(args, runner, logger):
691 '''method that is called when salomeTools is called with compile parameter.
694 (options, args) = parser.parse_args(args)
696 # Warn the user if he invoked the clean_all option
697 # without --products option
698 if (options.clean_all and
699 options.products is None and
700 not runner.options.batch):
701 rep = input(_("You used --clean_all without specifying a product"
702 " are you sure you want to continue? [Yes/No] "))
703 if rep.upper() != _("YES").upper():
706 if options.update and (options.clean_all or options.force or options.clean_install):
707 options.update=False # update is useless in this case
709 # check that the command has been called with an application
710 src.check_config_has_application( runner.cfg )
712 # Print some informations
713 logger.write(_('Executing the compile commands in the build '
714 'directories of the products of '
715 'the application %s\n') %
716 src.printcolors.printcLabel(runner.cfg.VARS.application), 1)
719 (_("SOURCE directory"),
720 os.path.join(runner.cfg.APPLICATION.workdir, 'SOURCES')),
721 (_("BUILD directory"),
722 os.path.join(runner.cfg.APPLICATION.workdir, 'BUILD'))
724 src.print_info(logger, info)
726 # Get the list of all application products, and create its dependency graph
727 all_products_infos = src.product.get_products_infos(runner.cfg.APPLICATION.products,
729 all_products_graph=get_dependencies_graph(all_products_infos)
730 #logger.write("Dependency graph of all application products : %s\n" % all_products_graph, 6)
731 DBG.write("Dependency graph of all application products : ", all_products_graph)
733 # Get the list of products we have to compile
734 products_infos = src.product.get_products_list(options, runner.cfg, logger)
735 products_list = [pi[0] for pi in products_infos]
737 logger.write("Product we have to compile (as specified by user) : %s\n" % products_list, 5)
739 # Extend the list with all recursive dependencies of the given products
741 for p_name in products_list:
742 visited=depth_search_graph(all_products_graph, p_name, visited)
743 products_list = visited
745 logger.write("Product list to compile with fathers : %s\n" % products_list, 5)
747 # Extend the list with all products that depends upon the given products
749 for n in all_products_graph:
750 # for all products (that are not in products_list):
751 # if we we find a path from the product to the product list,
752 # then we product is a child and we add it to the children list
753 if (n not in children) and (n not in products_list):
754 if find_path_graph(all_products_graph, n, products_list):
755 children = children + [n]
756 # complete products_list (the products we have to compile) with the list of children
757 products_list = products_list + children
758 logger.write("Product list to compile with children : %s\n" % products_list, 5)
760 # Sort the list of all products (topological sort).
761 # the products listed first do not depend upon products listed after
764 for n in all_products_graph:
765 if n not in visited_nodes:
766 visited_nodes,sorted_nodes=depth_first_topo_graph(all_products_graph, n, visited_nodes,sorted_nodes)
767 logger.write("Complete dependency graph topological search (sorting): %s\n" % sorted_nodes, 6)
769 # Create a dict of all products to facilitate products_infos sorting
771 for (pname,pinfo) in all_products_infos:
772 all_products_dict[pname]=(pname,pinfo)
774 # Use the sorted list of all products to sort the list of products we have to compile
775 sorted_product_list=[]
776 product_list_runtime=[]
777 product_list_compiletime=[]
779 # store at beginning compile time products, we need to compile them before!
780 for n in sorted_nodes:
781 if n in products_list:
782 sorted_product_list.append(n)
783 logger.write("Sorted list of products to compile : %s\n" % sorted_product_list, 5)
785 # from the sorted list of products to compile, build a sorted list of products infos
787 for product in sorted_product_list:
788 products_infos.append(all_products_dict[product])
790 # for all products to compile, store in "depend_all" field the complete dependencies (recursive)
791 # (will be used by check_dependencies function)
792 for pi in products_infos:
794 dep_prod=depth_search_graph(all_products_graph,pi[0], dep_prod)
795 pi[1]["depend_all"]=dep_prod[1:]
798 # Call the function that will loop over all the products and execute
799 # the right command(s)
800 res = compile_all_products(runner, runner.cfg, options, products_infos, all_products_dict, all_products_graph, logger)
802 # Print the final state
803 nb_products = len(products_infos)
809 logger.write(_("\nCompilation: %(status)s (%(valid_result)d/%(nb_products)d)\n") % \
810 { 'status': src.printcolors.printc(final_status),
811 'valid_result': nb_products - res,
812 'nb_products': nb_products }, 1)