Salome HOME
spns #40779: support multi repositories
[tools/sat.git] / commands / package.py
index 9ee70334c1396134273bbc7c48dacfd04163469e..1eb702b0122b91de376b0a69169730150b535969 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,8 +686,7 @@ def binary_package(config, logger, options, tmp_working_dir):
         if src.get_property_in_product_cfg(prod_info, "not_in_package") == "yes":
             continue
 
-        # skip product if github and product is not opensource
-        if config.APPLICATION.properties.github == "yes" and src.get_property_in_product_cfg(prod_info, "is_opensource") == "no":
+        if src.product.product_is_not_opensource(prod_info) and src.check_git_repository_has_non_opensource( cfg, git_server):
             continue
 
         # Add the sources of the products that have the property
@@ -997,8 +997,12 @@ def get_archives(config, logger):
                 or src.product.product_is_fixed(p_info)):
             continue
 
-        # skip product if github and product is not opensource
-        if config.APPLICATION.properties.github == "yes" and src.get_property_in_product_cfg(p_info, "is_opensource") == "no":
+        # 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)
+        has_git_server_non_opensource = src.check_git_repository_has_non_opensource( config, git_server)
+        if has_git_server_non_opensource and is_not_prod_opensource:
+            logger.warning("%s is a closed-source software and is not available on %s" % (product, git_server))
             continue
 
         if p_info.get_source == "archive":