]> SALOME platform Git repositories - tools/sat.git/blobdiff - commands/package.py
Salome HOME
Add Linux Mint to list of Ubuntu distributions
[tools/sat.git] / commands / package.py
index c5ffbfffbd9fa811dc8d329639e9c3e858fd49df..392703d4e55b201c3ea0273c9bd92b4ef820d677 100644 (file)
@@ -678,6 +678,7 @@ def binary_package(config, logger, options, tmp_working_dir):
         config.APPLICATION.properties.mesa_launcher_in_package == "yes") :
             generate_mesa_launcher=True
 
+    has_properties  = "APPLICATION" in config and "properties" in config.APPLICATION
     # first loop on products : filter products, analyse properties,
     # and store the information that will be used to create the archive in the second loop
     for prod_name, prod_info in l_product_info:
@@ -685,6 +686,9 @@ def binary_package(config, logger, options, tmp_working_dir):
         if src.get_property_in_product_cfg(prod_info, "not_in_package") == "yes":
             continue
 
+        if src.product.product_is_not_opensource(prod_info) and not src.git_server_has_all_repositories( cfg, git_server):
+            continue
+
         # Add the sources of the products that have the property
         # sources_in_package : "yes"
         if src.get_property_in_product_cfg(prod_info,
@@ -992,6 +996,15 @@ def get_archives(config, logger):
         if (src.product.product_is_native(p_info)
                 or src.product.product_is_fixed(p_info)):
             continue
+
+        # skip product if git server misses non opensource products
+        is_not_prod_opensource       = src.product.product_is_not_opensource(p_info)
+        git_server = src.get_git_server(config,logger)
+        if src.product.product_is_not_opensource(p_info) and not src.git_server_has_all_repositories(config, git_server):
+            logger.warning("%s is a closed-source software and is not available on %s" % (product, git_server))
+            logger.flush()
+            continue
+
         if p_info.get_source == "archive":
             archive_path = p_info.archive_info.archive_name
             archive_name = os.path.basename(archive_path)
@@ -1227,7 +1240,16 @@ def create_project_for_src_package(config, tmp_working_dir, with_vcs, with_ftp):
         ff.write("\n# Where to search for licences\n")
         ff.write(licence_path)
 
-
+    # finally add git repositories associated to this project
+    for project in config.PROJECTS.projects:
+        if 'git_server' in config.PROJECTS.projects[project]['git_info']:
+            ff.write("\n# git servers")
+            ff.write("\ngit_info :\n{\n\tgit_server :\n\t{\n")
+            git_servers=config.PROJECTS.projects[project]['git_info']['git_server']
+            for k in config.PROJECTS.projects[project]['git_info']['git_server'].keys():
+                ff.write('\t\t' +  k + ':' + config.PROJECTS.projects[project]['git_info']['git_server'][k].__str__() + '\n')
+            ff.write("\t}\n")
+            ff.write("}\n")
     ff.close()
 
     # Loop over the products to get there pyconf and all the scripts