p_name, p_info = p_name_info
if src.product.product_is_salome(p_info):
check_salome_configuration=True
-
- if src.product.product_test_property(p_info,"is_opensource", "no") and not src.check_git_server_has_non_opensource(config, config.APPLICATION.properties.git_server):
+ # if product is closed source and git server is public skip the current product
+ if src.product.product_is_not_opensource(p_info) and not src.git_server_has_all_repositories(config, config.APPLICATION.properties.git_server):
continue
# nothing to clean for native or fixed products
if (not src.product.product_compiles(p_info)) or\
log_step(logger, header, "ignored")
logger.write("\n", 3, False)
continue
- if src.product.product_test_property(p_info,"is_opensource", "no") and not src.check_git_server_has_non_opensource(config, config.APPLICATION.properties.git_server):
+
+ # skip product if git server does not host all git repositories
+ # product is not opensource and git server does not have all repositories (closed and open sources)
+ if src.product.product_is_not_opensource(p_info) and not src.git_server_has_all_repositories(config, config.APPLICATION.properties.git_server):
log_step(logger, header, "ignored")
logger.write("\n", 3, False)
continue
is_pip= (src.appli_test_property(config,"pip", "yes") and src.product.product_test_property(p_info,"pip", "yes"))
# don't check sources with option --show
# or for products managed by pip (there sources are in wheels stored in LOCAL.ARCHIVE
- if not (options.no_compile or is_pip):
+ if not (options.no_compile or is_pip):
if not check_source:
logger.write(_("Sources of product not found (try 'sat -h prepare') \n"))
res += 1 # one more error
if src.get_property_in_product_cfg(prod_info, "not_in_package") == "yes":
continue
- if src.product.product_is_not_opensource(prod_info) and src.check_git_server_has_non_opensource( cfg, git_server):
+ 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
# 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_server_has_non_opensource( config, git_server)
- if has_git_server_non_opensource and is_not_prod_opensource:
+ 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
git_server = src.get_git_server(runner.cfg,logger)
- if src.check_git_server_has_non_opensource( runner.cfg, git_server):
+ # current git server hosts only opensource repositories - then remove products which are not hosted
+ if not src.git_server_has_all_repositories(runner.cfg, git_server):
not_opensource_products = [p for p in products_infos if src.product.product_is_not_opensource(p[1])]
listProd = [p for p in listProd if p not in [name for name, tmp in not_opensource_products]]
logger.flush()
config.APPLICATION.addMapping( 'properties', pyconf.Mapping(), None )
config.APPLICATION.properties.use_mesa="yes"
-def check_git_server_has_non_opensource( config, the_git_server):
- """check that the git server contains non public repositories
+def git_server_has_all_repositories( config, the_git_server):
+ """check that the git server contains all repositories (closed and open)
:param config class 'common.pyconf.Config': The config.
:param logger Logger: The logging instance to use for the prints.
"""
if 'opensource_git_servers' in config.VARS:
for git_server in config.VARS['opensource_git_servers']:
if git_server == the_git_server:
- return True
- return False
- return
+ return False
+ return True
def get_git_server(config, logger):
the_git_server= None
# src.appli_test_property(self.cfg,"pip_install_dir", "python") ):
# return
- # skip product if git server misses non opensource products
- is_not_prod_opensource = src.product.product_is_not_opensource(pi)
+ # skip product if git server does not host all git repositories
git_server= src.get_git_server(self.cfg, logger)
- has_git_server_non_opensource = src.check_git_server_has_non_opensource( self.cfg, git_server)
- if has_git_server_non_opensource and is_not_prod_opensource:
+ if src.product.product_is_not_opensource(pi) and not src.git_server_has_all_repositories( self.cfg, git_server):
logger.warning("%s is a closed-source software and is not available on %s" % (pi.name, git_server))
return
logger.error("%s does not have associated information" % (product))
continue
if 'get_source' in prod_info and prod_info.get_source == 'git':
- is_prod_opensource = not src.product.product_is_not_opensource(prod_info)
git_server = src.get_git_server(cfg,logger)
else:
git_server = cfg.VARS['default_git_server_dev']
- has_git_server_non_opensource = src.check_git_server_has_non_opensource( cfg, git_server)
- if has_git_server_non_opensource and not is_prod_opensource:
+ if src.product.product_is_not_opensource(prod_info) and not src.git_server_has_all_repositories(cfg, git_server):
logger.warning("%s is a closed-source software and is not available on %s" % (product, git_server))
logger.flush()
continue