]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
fix(upgrade): add retry of the compilation after cleaning when there is an error. ast/update
authorSONOLET Aymeric <aymeric.sonolet@cea.fr>
Mon, 11 Dec 2023 10:54:42 +0000 (11:54 +0100)
committerSONOLET Aymeric <aymeric.sonolet@cea.fr>
Mon, 11 Dec 2023 10:54:42 +0000 (11:54 +0100)
commands/upgrade.py

index 15aa75545cfebb77f707bdaf2c85158ca5511e34..7f301d7b62723df79e417163875e91edf5a0666d 100644 (file)
@@ -400,6 +400,27 @@ def upgrade_all_products(
         res_prod, len_end_line, error_step = upgrade_product(
             sat, p_name_info, config, options, logger, header, len_end_line
         )
+        if res_prod > 0:
+            logger.write(
+                src.printcolors.printcError(
+                    _(
+                        "\nERROR : the product does not compile, retrying after clean it."
+                    )
+                )
+            )
+            sat.clean(
+                config.VARS.application
+                + " --products "
+                + p_name
+                + " --install"
+                + " --build",
+                batch=True,
+                verbose=0,
+                logger_add_link=logger,
+            )
+            res_prod, len_end_line, error_step = upgrade_product(
+                sat, p_name_info, config, options, logger, header, len_end_line
+            )
 
         if res_prod != 0:
             res += 1