From e95acee870b58524a433cfcead28cc5dd223aaff Mon Sep 17 00:00:00 2001 From: crouzet Date: Fri, 14 Dec 2018 17:23:42 +0100 Subject: [PATCH] do not write sat-product.pyconf if config is not complete (case of archives) --- src/product.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/product.py b/src/product.py index f1fa34b..a06b5b8 100644 --- a/src/product.py +++ b/src/product.py @@ -484,7 +484,14 @@ def add_compile_config_file(p_info, config): aFile = os.path.join(p_info.install_dir, PRODUCT_FILENAME) with open(aFile, 'w') as f: # f.write(DBG.getStrConfigDbg(p_info)) # debug mode - p_info.__save__(f, evaluated=True) # evaluated expressions mode + try: + p_info.__save__(f, evaluated=True) # evaluated expressions mode + except: + # the second file is not mandatory. In the context of non VCS archives, p_info cannot be evaluated + # because information on git server is not available. In this case, we skip the writing without raising an error. + #DBG.write("cannot evaluate product info - do not write ", PRODUCT_FILENAME, True) + pass + def check_config_exists(config, prod_dir, prod_info, verbose=False): -- 2.39.2