]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
sat #18392 : archives binaires KO lorsque des produits sont en mode base
authorcrouzet <nicolas.crouzet@cea.fr>
Fri, 29 Nov 2019 13:05:02 +0000 (14:05 +0100)
committercrouzet <nicolas.crouzet@cea.fr>
Fri, 29 Nov 2019 13:05:02 +0000 (14:05 +0100)
commands/package.py
src/environment.py

index 97768f47881be2e65c724158487681b0a4d4b6e4..f76b37bfba1d526a34abfbbb0526ed5577759df1 100644 (file)
@@ -197,7 +197,13 @@ def produce_relative_launcher(config,
     '''
     
     # get KERNEL installation path 
-    kernel_root_dir = os.path.join(binaries_dir_name, "KERNEL")
+    kernel_info = src.product.get_product_config(config, "KERNEL")
+    kernel_base_name=os.path.basename(kernel_info.install_dir)
+    if kernel_base_name.startswith("config"):
+        # case of kernel installed in base. We remove "config-i"
+        kernel_base_name=os.path.basename(os.path.dirname(kernel_info.install_dir))
+    
+    kernel_root_dir = os.path.join(binaries_dir_name, kernel_base_name)
 
     # set kernel bin dir (considering fhs property)
     kernel_cfg = src.product.get_product_config(config, "KERNEL")
@@ -622,7 +628,11 @@ WARNING: existing binaries directory from previous detar installation:
     # actual install directories and there install directory in archive
     d_products = {}
     for prod_name, install_dir in l_install_dir:
-        path_in_archive = os.path.join(binaries_dir_name, os.path.basename(install_dir))
+        prod_base_name=os.path.basename(install_dir)
+        if prod_base_name.startswith("config"):
+            # case of a products installed in base. We remove "config-i"
+            prod_base_name=os.path.basename(os.path.dirname(install_dir))
+        path_in_archive = os.path.join(binaries_dir_name, prod_base_name)
         d_products[prod_name + " (bin)"] = (install_dir, path_in_archive)
         
     for prod_name, source_dir in l_source_dir:
index e6540b050c841f4c83dc9ff3319726d61125d1a5..c8585e2d54436cade95811c2f8c1a8e9fa2045ae 100644 (file)
@@ -608,10 +608,14 @@ class SalomeEnviron:
                
         
         if self.for_package:
+            prod_base_name=os.path.basename(pi.install_dir)
+            if prod_base_name.startswith("config"):
+                # case of a products installed in base. We remove "config-i"
+                prod_base_name=os.path.basename(os.path.dirname(pi.install_dir))
             pi.install_dir = os.path.join(
                                  "out_dir_Path",
                                  self.for_package,
-                                 os.path.basename(pi.install_dir))
+                                 prod_base_name)
 
         if not self.silent:
             logger.write(_("Setting environment for %s\n") % product, 4)