From 29b2c3476576ff1eccbec7798778e3fc2bcb5adb Mon Sep 17 00:00:00 2001 From: panwentao Date: Tue, 19 Mar 2024 17:52:31 +0800 Subject: [PATCH] local_conf: Modify splicing path * Modify splicing path Signed-off-by: panwentao --- src/oebuild/local_conf.py | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/src/oebuild/local_conf.py b/src/oebuild/local_conf.py index 9e75ec2..9420284 100644 --- a/src/oebuild/local_conf.py +++ b/src/oebuild/local_conf.py @@ -57,8 +57,8 @@ def get_nativesdk_sysroot(nativesdk_dir=oebuild_const.NATIVESDK_DIR): if ret is not None: abs_path = os.path.join(sysroot_dir, item) if os.path.isdir(abs_path): - return os.path.join("sysroot", item) - logger.error("can not find any sysroot directory") + return os.path.join("sysroots", item) + logger.error("can not find any sysroots directory") sys.exit(1) @@ -93,6 +93,7 @@ def match_and_replace(pre: str, new_str: str, content: str): return content +# pylint:disable=[R0914,R0911,R0912,R0915] class LocalConf: ''' LocalConf corresponds to the local.conf configuration @@ -219,27 +220,6 @@ class LocalConf: content=content) return content - def replace_param(self, parse_compile: ParseCompile, content: str): - ''' - match and replace param by ParseCompile.local_conf - ''' - if parse_compile.local_conf is None: - return - for line in parse_compile.local_conf.split('\n'): - ret = re.match(r'^([A-Z0-9_:]+)(append)(\s)', line) - if ret is not None: - content = match_and_add(line, content) - continue - ret = re.match(r'^(([A-Z0-9a-z_-]|[/])+)(\s)', line) - if ret is not None: - content = match_and_replace(ret.group(), line, content) - continue - ret = re.match(r'^(require)(\s)', line) - if ret is not None: - content = match_and_add(line, content) - continue - return content - def check_nativesdk_valid(self, nativesdk_dir): ''' Check whether the set nativesdk is valid, check whether -- Gitee