From bf7e43932222abc3a80d6dd03a40351d3a0dee26 Mon Sep 17 00:00:00 2001 From: flying Date: Tue, 23 Jan 2024 12:18:15 +0000 Subject: [PATCH 1/2] update tools/components_deps/components_deps_analyzer.py. Signed-off-by: flying --- tools/components_deps/components_deps_analyzer.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/components_deps/components_deps_analyzer.py b/tools/components_deps/components_deps_analyzer.py index c11a130..fbdbe5d 100644 --- a/tools/components_deps/components_deps_analyzer.py +++ b/tools/components_deps/components_deps_analyzer.py @@ -79,14 +79,13 @@ class Analyzer: if component in txt: dependent_close = False scan_line_num = cls.__get_scan_line_num(gn_lines, new_line_num) - for i in scan_line_num: - dep_info = "" + for i in scan_line_num: if '/' in gn_lines[i - 1]: - dep_info += re.findall('/(.*?):', gn_lines[i - 1])[0] + dep_info = re.findall('(.*?):', gn_lines[i - 1].split("/")[-1])[0] else: - dep_info += re.findall('"(.*?):', gn_lines[i - 1])[0] + dep_info = re.findall('"(.*?):', gn_lines[i - 1])[0] for component in optional_components: - if component not in white_names and component in dep_info: + if component not in white_names and component == dep_info: deps.append((component, i)) error = list() if dependent_close == True and re.findall('deps =', txt): -- Gitee From 4c56a55f25ce90dab876b581106fe7a5d2d4ba5b Mon Sep 17 00:00:00 2001 From: flying Date: Tue, 23 Jan 2024 12:19:26 +0000 Subject: [PATCH 2/2] update tools/components_deps/components_deps_analyzer.py. Signed-off-by: flying --- tools/components_deps/components_deps_analyzer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/components_deps/components_deps_analyzer.py b/tools/components_deps/components_deps_analyzer.py index fbdbe5d..b74aa43 100644 --- a/tools/components_deps/components_deps_analyzer.py +++ b/tools/components_deps/components_deps_analyzer.py @@ -79,7 +79,7 @@ class Analyzer: if component in txt: dependent_close = False scan_line_num = cls.__get_scan_line_num(gn_lines, new_line_num) - for i in scan_line_num: + for i in scan_line_num: if '/' in gn_lines[i - 1]: dep_info = re.findall('(.*?):', gn_lines[i - 1].split("/")[-1])[0] else: -- Gitee