From: Serge Rehbinder Date: Thu, 9 Feb 2017 09:39:46 +0000 (+0100) Subject: fix bug when compiling with option --clean_all a product that changes its install... X-Git-Tag: 5.0.0a1~28 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f590cf61385d50a02548605ea467d34faa84b328;p=tools%2Fsat.git fix bug when compiling with option --clean_all a product that changes its install dir from config-x to config-y --- diff --git a/commands/compile.py b/commands/compile.py index ece2588..c7d0f2d 100644 --- a/commands/compile.py +++ b/commands/compile.py @@ -329,6 +329,10 @@ def compile_all_products(sat, config, options, products_infos, logger): verbose=0, logger_add_link = logger) + # Recompute the product information to get the right install_dir + # (it could change if there is a clean of the install directory) + p_info = src.product.get_product_config(config, p_name) + # Check if it was already successfully installed if src.product.check_installation(p_info): logger.write(_("Already installed\n")) diff --git a/src/product.py b/src/product.py index 13dab6e..3ee4847 100644 --- a/src/product.py +++ b/src/product.py @@ -262,6 +262,15 @@ def get_product_config(config, product_name, with_install_dir=True): # The variable with_install_dir is at false only for internal use # of the function get_install_dir + # Save the install_dir key if there is any + if "install_dir" in prod_info and not "install_dir_save" in prod_info: + prod_info.install_dir_save = prod_info.install_dir + + # if it is not the first time the install_dir is computed, it means + # that install_dir_save exists and it has to be taken into account. + if "install_dir_save" in prod_info: + prod_info.install_dir = prod_info.install_dir_save + # Set the install_dir key prod_info.install_dir = get_install_dir(config, base, version, prod_info)