From 45920645229a2f7be0c757b7ebb055947bfcda58 Mon Sep 17 00:00:00 2001 From: lixinyu Date: Thu, 7 Mar 2024 16:52:40 +0800 Subject: [PATCH] fix: fix somes bugs * add description of DockerParam if parse_compile.py * alter .gitignore and let build move to top level directory * fix the bug of error key "demux" in function container_exec_command Signed-off-by: lixinyu --- .gitignore | 2 +- src/oebuild/docker_proxy.py | 2 +- src/oebuild/parse_compile.py | 16 +++++++++++----- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 1318247..8492c1c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,5 @@ project __pycache__ oebuild.egg-info .vscode -build +./build dist \ No newline at end of file diff --git a/src/oebuild/docker_proxy.py b/src/oebuild/docker_proxy.py index 458c935..ddd7f1e 100644 --- a/src/oebuild/docker_proxy.py +++ b/src/oebuild/docker_proxy.py @@ -201,7 +201,7 @@ class DockerProxy: stderr=True, stdout=True, stream=True if "stream" not in params else params['stream'], - demux=False if "demux" not in params else params['dumex'] + demux=False if "demux" not in params else params['demux'] ) return res diff --git a/src/oebuild/parse_compile.py b/src/oebuild/parse_compile.py index d4ef81e..ede03d2 100644 --- a/src/oebuild/parse_compile.py +++ b/src/oebuild/parse_compile.py @@ -26,7 +26,7 @@ from oebuild.m_log import logger @dataclass class DockerParam: ''' - xxxxxxxxx + DockerParam defines the various parameters required for container startup ''' # point out the docker image image: str @@ -39,9 +39,9 @@ class DockerParam: @dataclass -class Compile(PlatformTemplate): +class BuildParam: ''' - Compile is the parsed object of compile.yaml and is used to manipulate the build file + Carries the compilation-related parameters. ''' toolchain_dir: Optional[str] @@ -49,8 +49,6 @@ class Compile(PlatformTemplate): not_use_repos: bool - build_in: str - sstate_cache: Optional[str] sstate_dir: Optional[str] @@ -59,6 +57,14 @@ class Compile(PlatformTemplate): docker_image: Optional[str] + +@dataclass +class Compile(PlatformTemplate, BuildParam): + ''' + Compile is the parsed object of compile.yaml and is used to manipulate the build file + ''' + build_in: str + docker_param: Optional[DockerParam] -- Gitee