From: SONOLET Aymeric Date: Mon, 11 Dec 2023 10:54:42 +0000 (+0100) Subject: fix(upgrade): add retry of the compilation after cleaning when there is an error. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ec55d455f49013a7cc3522167eef2dade349c36d;p=tools%2Fsat.git fix(upgrade): add retry of the compilation after cleaning when there is an error. --- diff --git a/commands/upgrade.py b/commands/upgrade.py index 15aa755..7f301d7 100644 --- a/commands/upgrade.py +++ b/commands/upgrade.py @@ -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