+def find_products_already_getted(l_products):
+ '''function that returns the list of products that have an existing source
+ directory.
+
+ :param l_products List: The list of products to check
+ :return: The list of product configurations that have an existing source
+ directory.
+ :rtype: List
+ '''
+ l_res = []
+ for p_name_p_cfg in l_products:
+ __, prod_cfg = p_name_p_cfg
+ if os.path.exists(prod_cfg.source_dir):
+ l_res.append(p_name_p_cfg)
+ return l_res
+
+def find_products_with_patchs(l_products):
+ '''function that returns the list of products that have one or more patches.
+
+ :param l_products List: The list of products to check
+ :return: The list of product configurations that have one or more patches.
+ :rtype: List
+ '''
+ l_res = []
+ for p_name_p_cfg in l_products:
+ __, prod_cfg = p_name_p_cfg
+ l_patchs = src.get_cfg_param(prod_cfg, "patches", [])
+ if len(l_patchs)>0:
+ l_res.append(p_name_p_cfg)
+ return l_res
+