if src.product.product_is_salome(p_info):
check_salome_configuration=True
+ if config.APPLICATION.properties.github == 'yes' and src.product.product_test_property(p_info,"is_opensource", "no"):
+ continue
# nothing to clean for native or fixed products
if (not src.product.product_compiles(p_info)) or\
src.product.product_is_native(p_info) or\
log_step(logger, header, "ignored")
logger.write("\n", 3, False)
continue
+ if config.APPLICATION.properties.github == 'yes' and src.product.product_test_property(p_info,"is_opensource", "no"):
+ log_step(logger, header, "ignored")
+ logger.write("\n", 3, False)
+ continue
# Do nothing if the product is native
if src.product.product_is_native(p_info):
logger.write(_("Sources of product not found (try 'sat -h prepare') \n"))
res += 1 # one more error
continue
-
# if we don't force compilation, check if the was already successfully installed.
# we don't compile in this case.
if (not options.force) and src.product.check_installation(config, p_info):
logger.write(_(" in %s" % p_info.install_dir), 4)
logger.write(_("\n"))
continue
-
+
# If the show option was called, do not launch the compilation
if options.no_compile:
logger.write(_("Not installed in %s\n" % p_info.install_dir))
continue
-
+
# Check if the dependencies are installed
l_depends_not_installed = check_dependencies(config, p_name_info, all_products_dict)
if len(l_depends_not_installed) > 0:
logger.write(src.printcolors.printcError(prod_name + " "))
logger.write("\n")
continue
-
+
# Call the function to compile the product
res_prod, len_end_line, error_step = compile_product(
sat, p_name_info, config, options, logger, header, len_end_line)
'directories of the products of '
'the application %s\n') %
src.printcolors.printcLabel(runner.cfg.VARS.application), 1)
-
+
info = [
(_("SOURCE directory"),
os.path.join(runner.cfg.APPLICATION.workdir, 'SOURCES')),
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":
+ continue
+
# Add the sources of the products that have the property
# sources_in_package : "yes"
if src.get_property_in_product_cfg(prod_info,
if (src.product.product_is_native(p_info)
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(prod_info, "is_opensource") == "no":
+ continue
+
if p_info.get_source == "archive":
archive_path = p_info.archive_info.archive_name
archive_name = os.path.basename(archive_path)
_("Optional: completion mode, only prepare products not present in SOURCES dir."),
False)
-
def find_products_already_prepared(l_products):
'''function that returns the list of products that have an existing source
directory.
src.check_platform_is_supported( runner.cfg, logger )
products_infos = src.product.get_products_list(options, runner.cfg, logger)
-
# Construct the arguments to pass to the clean, source and patch commands
args_appli = runner.cfg.VARS.application + " " # useful whitespace
if options.products:
listProd = list(options.products)
else: # no product interpeted as all products
listProd = [name for name, tmp in products_infos]
+ if runner.cfg.APPLICATION.properties.github == 'yes':
+ 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]]
if options.complete:
# remove products that are already prepared 'completion mode)
args_clean = args_appli + args_product_opt_clean + " --sources"
args_source = args_appli + args_product_opt
args_patch = args_appli + args_product_opt_patch
-
# Initialize the results to a running status
res_clean = 0
res_source = 0
# The str to display
coflag = 'git'
- use_repo_dev=False
+ use_repo_dev = "APPLICATION" in config and "properties" in config.APPLICATION and "github" in config.APPLICATION.properties and not config.APPLICATION.properties.github == "yes"
if ("APPLICATION" in config and
"properties" in config.APPLICATION and
"repo_dev" in config.APPLICATION.properties and
- config.APPLICATION.properties.repo_dev == "yes") :
+ config.APPLICATION.properties.repo_dev == "yes" and
+ use_repo_dev == True ) :
use_repo_dev=True
# Get the repository address.
# src.appli_test_property(self.cfg,"pip_install_dir", "python") ):
# return
+ # skip product if github and product is not opensource
+ if self.cfg.APPLICATION.properties.github == "yes" and src.get_property_in_product_cfg(pi, "is_opensource") == "no":
+ return
+
# skip mesa products (if any) at run time,
# unless use_mesa property was activated
if not self.forBuild:
"cpp" in product_info.properties and
product_info.properties.cpp == "yes")
+def product_is_not_opensource(product_info):
+ """Check if a given product is not open
+
+ :param product_info Config: The configuration specific to
+ the product
+ :return: True if the product is an opensource, False otherwise
+ :rtype: boolean
+ """
+ return ("properties" in product_info and
+ "is_opensource" in product_info.properties and
+ product_info.properties.is_opensource == "no")
+
def product_compiles(product_info):
"""\
Know if a product compiles or not