From f08812106cf0ef905ebb1e89c1e580233427a1c2 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Mon, 15 Jul 2024 14:56:00 +0200 Subject: [PATCH] spns #41965: Ensure one can run prepare from one archive which embeds SAT --- commands/package.py | 7 +++++++ src/product.py | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/commands/package.py b/commands/package.py index 050df51..eec437a 100644 --- a/commands/package.py +++ b/commands/package.py @@ -1240,6 +1240,13 @@ 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']: + git_servers=cfg.PROJECTS.projects[project]['git_info']['git_server'] + for git_server in git_servers: + print(git_server) + if 'git_info' in config.PROJECT and "git_server" in config.PROJECT: ff.close() diff --git a/src/product.py b/src/product.py index b644681..8f49eb1 100644 --- a/src/product.py +++ b/src/product.py @@ -800,15 +800,16 @@ def get_products_list(options, cfg, logger): products=[] for product in cfg.APPLICATION.products.keys(): prod_info = get_product_config(cfg, product) + git_server = None if prod_info is None: logger.error("%s does not have associated information" % (product)) continue if 'get_source' in prod_info and prod_info.get_source == 'git': git_server = src.get_git_server(cfg,logger) - else: + elif 'default_git_server_dev' in cfg.VARS.keys(): git_server = cfg.VARS['default_git_server_dev'] - if src.product.product_is_not_opensource(prod_info) and not src.git_server_has_all_repositories(cfg, git_server): + if git_server is not None and 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 -- 2.39.2