From 09b421b007da4a822b06caaeb29d5b766f58ff3a Mon Sep 17 00:00:00 2001 From: lixinyu Date: Sat, 27 Jan 2024 10:07:49 +0800 Subject: [PATCH] local: alter local.conf deal logic * add deal logic about line starting with "#", if match, replace it. Signed-off-by: lixinyu --- src/oebuild/local_conf.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/oebuild/local_conf.py b/src/oebuild/local_conf.py index 1f93ed6..6a0a230 100644 --- a/src/oebuild/local_conf.py +++ b/src/oebuild/local_conf.py @@ -182,6 +182,11 @@ class LocalConf: user_content_flag = "#===========the content is user added==================" if user_content_flag not in content and parse_compile.local_conf != "": + # check if exists remark sysmbol, if exists and replace it + for line in parse_compile.local_conf.split('\n'): + if line.startswith("#"): + r_line = line.lstrip("#").strip(" ") + content = content.replace(r_line, line) content += f"\n{user_content_flag}\n" content += parse_compile.local_conf -- Gitee