From ec55d455f49013a7cc3522167eef2dade349c36d Mon Sep 17 00:00:00 2001 From: SONOLET Aymeric Date: Mon, 11 Dec 2023 11:54:42 +0100 Subject: [PATCH] fix(upgrade): add retry of the compilation after cleaning when there is an error. --- commands/upgrade.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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 -- 2.39.2