diff --git a/src/oebuild/local_conf.py b/src/oebuild/local_conf.py index 9e75ec23fdb5ac433a9560cda553a1a233518840..9420284ac012bed73aba5a8de250f1987eaa60a9 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