From: crouzet Date: Fri, 6 Mar 2020 15:45:11 +0000 (+0100) Subject: sat #18546 : replacement / par _ dans le nom des repertoire en base X-Git-Tag: 5.6.0~20 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c110495bd6cd92f52daa8357eacffef20eb48a98;p=tools%2Fsat.git sat #18546 : replacement / par _ dans le nom des repertoire en base --- diff --git a/doc/src/release_notes/release_notes_5.6.0.rst b/doc/src/release_notes/release_notes_5.6.0.rst index e8a14c6..d5148ea 100644 --- a/doc/src/release_notes/release_notes_5.6.0.rst +++ b/doc/src/release_notes/release_notes_5.6.0.rst @@ -34,7 +34,8 @@ most significant changes are listed. +=============+===================================================================================+ | sat #18501 | mauvaise gestion de la fonctionnalité rm_products dans les archives | +-------------+-----------------------------------------------------------------------------------+ -| | | +| sat #18546 | pour les produits installés en base, replacement dans le nom du répertoire de / | +| | par _ pour éviter la création d'un sous répertoire | +-------------+-----------------------------------------------------------------------------------+ | | | +-------------+-----------------------------------------------------------------------------------+ diff --git a/src/product.py b/src/product.py index 5994095..7323a28 100644 --- a/src/product.py +++ b/src/product.py @@ -556,6 +556,10 @@ def get_base_install_dir(config, prod_info, version): :return: The path of the product installation :rtype: str """ + + # get rid of / to avoid create subdirectories cf sat #18546 + version_wslash=version.replace("/", "_") + if ( src.appli_test_property(config,"pip", "yes") and src.product.product_test_property(prod_info,"pip", "yes") and src.appli_test_property(config,"pip_install_dir", "python") ): @@ -567,10 +571,10 @@ def get_base_install_dir(config, prod_info, version): base_path = src.get_base_path(config) if "base" in prod_info and prod_info.base != "no" and prod_info.base != "yes": # we are in the case of a named base - prod_dir = os.path.join(base_path, "apps", prod_info.base, prod_info.name, version) + prod_dir = os.path.join(base_path, "apps", prod_info.base, prod_info.name, version_wslash) return prod_dir - prod_dir = os.path.join(base_path, prod_info.name + "-" + version) + prod_dir = os.path.join(base_path, prod_info.name + "-" + version_wslash) if not os.path.exists(prod_dir): return os.path.join(prod_dir, "config-1")