]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
fix bug when compiling with option --clean_all a product that changes its install...
authorSerge Rehbinder <serge.rehbinder@cea.fr>
Thu, 9 Feb 2017 09:39:46 +0000 (10:39 +0100)
committerSerge Rehbinder <serge.rehbinder@cea.fr>
Thu, 9 Feb 2017 09:39:46 +0000 (10:39 +0100)
commands/compile.py
src/product.py

index ece2588a9d7956069d5e7e6b30286eb54b9c86e6..c7d0f2d9de38ef8d1e9120517ae69caf8533fe1b 100644 (file)
@@ -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"))
index 13dab6e34b99408bff87781b94daa1a9caceff8b..3ee4847b2e3f4deaeb07a5626e9a96c992c47db5 100644 (file)
@@ -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)