+def check_source(product_info):
+ '''Verify if a sources of product is preset. Checks source directory presence
+
+ :param product_info Config: The configuration specific to
+ the product
+ :return: True if it is well installed
+ :rtype: boolean
+ '''
+ DBG.write("check_source product_info", product_info)
+ source_dir = product_info.source_dir
+ if not os.path.exists(source_dir):
+ return False
+ if ("present_files" in product_info and
+ "source" in product_info.present_files):
+ for file_relative_path in product_info.present_files.source:
+ file_path = os.path.join(source_dir, file_relative_path)
+ if not os.path.exists(file_path):
+ return False
+ return True
+