From ef425b895da95403a2e52409d409c890e0876d08 Mon Sep 17 00:00:00 2001 From: crouzet Date: Fri, 29 Nov 2019 14:05:02 +0100 Subject: [PATCH] sat #18392 : archives binaires KO lorsque des produits sont en mode base --- commands/package.py | 14 ++++++++++++-- src/environment.py | 6 +++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/commands/package.py b/commands/package.py index 97768f4..f76b37b 100644 --- a/commands/package.py +++ b/commands/package.py @@ -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: diff --git a/src/environment.py b/src/environment.py index e6540b0..c8585e2 100644 --- a/src/environment.py +++ b/src/environment.py @@ -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) -- 2.39.2