openubmc-bingo 0.5.277__py3-none-any.whl → 0.6.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of openubmc-bingo might be problematic. Click here for more details.
- bmcgo/__init__.py +1 -1
- bmcgo/bmcgo_config.py +22 -10
- bmcgo/cli/cli.py +95 -39
- bmcgo/cli/config.conan2.yaml +9 -0
- bmcgo/codegen/lua/codegen.py +2 -2
- bmcgo/codegen/lua/script/gen_intf_rpc_json.py +15 -14
- bmcgo/component/analysis/analysis.py +8 -8
- bmcgo/component/analysis/intf_validation.py +23 -12
- bmcgo/component/build.py +76 -14
- bmcgo/component/component_dt_version_parse.py +3 -2
- bmcgo/component/component_helper.py +43 -15
- bmcgo/component/coverage/incremental_cov.py +2 -2
- bmcgo/component/deploy.py +68 -14
- bmcgo/component/gen.py +1 -1
- bmcgo/component/package_info.py +128 -38
- bmcgo/component/template/conanbase.py.mako +1 -0
- bmcgo/component/template_v2/conanbase.py.mako +383 -0
- bmcgo/component/template_v2/conanfile.deploy.py.mako +26 -0
- bmcgo/component/test.py +53 -20
- bmcgo/frame.py +7 -3
- bmcgo/functional/analysis.py +3 -2
- bmcgo/functional/check.py +10 -6
- bmcgo/functional/conan_index_build.py +96 -20
- bmcgo/functional/csr_build.py +1 -1
- bmcgo/functional/diff.py +1 -1
- bmcgo/functional/fetch.py +1 -1
- bmcgo/functional/full_component.py +32 -24
- bmcgo/functional/git_history.py +220 -0
- bmcgo/functional/maintain.py +55 -12
- bmcgo/functional/new.py +1 -1
- bmcgo/functional/schema_valid.py +2 -2
- bmcgo/logger.py +2 -3
- bmcgo/misc.py +130 -9
- bmcgo/tasks/conan/__init__.py +10 -0
- bmcgo/tasks/conan/conanfile.py +45 -0
- bmcgo/tasks/task.py +27 -4
- bmcgo/tasks/task_build_conan.py +425 -53
- bmcgo/tasks/task_buildgppbin.py +8 -2
- bmcgo/tasks/task_download_buildtools.py +76 -0
- bmcgo/tasks/task_download_dependency.py +1 -0
- bmcgo/tasks/task_hpm_envir_prepare.py +1 -1
- bmcgo/utils/build_conans.py +231 -0
- bmcgo/utils/component_post.py +6 -4
- bmcgo/utils/component_version_check.py +75 -16
- bmcgo/utils/config.py +76 -40
- bmcgo/utils/fetch_component_code.py +44 -25
- bmcgo/utils/tools.py +239 -117
- bmcgo/worker.py +2 -2
- {openubmc_bingo-0.5.277.dist-info → openubmc_bingo-0.6.2.dist-info}/METADATA +4 -2
- {openubmc_bingo-0.5.277.dist-info → openubmc_bingo-0.6.2.dist-info}/RECORD +53 -46
- {openubmc_bingo-0.5.277.dist-info → openubmc_bingo-0.6.2.dist-info}/WHEEL +0 -0
- {openubmc_bingo-0.5.277.dist-info → openubmc_bingo-0.6.2.dist-info}/entry_points.txt +0 -0
- {openubmc_bingo-0.5.277.dist-info → openubmc_bingo-0.6.2.dist-info}/top_level.txt +0 -0
bmcgo/tasks/task.py
CHANGED
|
@@ -20,13 +20,13 @@ import tempfile
|
|
|
20
20
|
import filecmp
|
|
21
21
|
from string import Template
|
|
22
22
|
from multiprocessing import Process
|
|
23
|
-
from collections import OrderedDict
|
|
24
23
|
|
|
25
24
|
import yaml
|
|
26
|
-
from conans.model.profile import Profile
|
|
27
25
|
from bmcgo.utils.config import Config
|
|
28
26
|
from bmcgo.utils.tools import Tools
|
|
29
27
|
from bmcgo import errors
|
|
28
|
+
from bmcgo import misc
|
|
29
|
+
from bmcgo.component.deploy import GraphNode
|
|
30
30
|
from bmcgo.utils.component_post import ComponentPost
|
|
31
31
|
from bmcgo.functional.simple_sign import BmcgoCommand as SimpleSign
|
|
32
32
|
|
|
@@ -40,12 +40,21 @@ class Task(Process):
|
|
|
40
40
|
|
|
41
41
|
def __init__(self, config: Config, work_name=""):
|
|
42
42
|
super(Task, self).__init__()
|
|
43
|
+
self.community_name = misc.community_name()
|
|
43
44
|
log_file = os.path.join(config.temp_path, "log", "task.log")
|
|
44
45
|
self.tools: Tools = Tools(work_name, log_file=log_file)
|
|
45
46
|
self.log = self.tools.log
|
|
46
47
|
self.config: Config = config
|
|
47
48
|
self.built_type_check()
|
|
48
49
|
self.work_name = work_name
|
|
50
|
+
# 记录每个组件的GraphNode信息
|
|
51
|
+
self.graph_nodes: dict[str, GraphNode] = {}
|
|
52
|
+
# 设置默认的厂商名,产品可以manifest.yml的base/vendor中设置
|
|
53
|
+
# manifest未配置vendor时,使用OPENUBMC_DEFAULT_VENDOR环境变量
|
|
54
|
+
# OPENUBMC_DEFAULT_VENDOR环境变量未设置时,使用openubmc
|
|
55
|
+
self.vendor = self.get_manufacture_config("base/vendor", misc.vendor())
|
|
56
|
+
os.environ["OPENUBMC_PRODUCT_VENDOR"] = self.vendor
|
|
57
|
+
self.customization_dir = os.path.join(self.config.build_path, "customizations")
|
|
49
58
|
|
|
50
59
|
@property
|
|
51
60
|
def conan_home(self):
|
|
@@ -210,7 +219,7 @@ class Task(Process):
|
|
|
210
219
|
"""
|
|
211
220
|
return self.config.get_manufacture_config(key, default_val)
|
|
212
221
|
|
|
213
|
-
def get_profile_config(self)
|
|
222
|
+
def get_profile_config(self):
|
|
214
223
|
return self.tools.get_profile_config(self.config.profile)
|
|
215
224
|
|
|
216
225
|
def prepare_conan(self):
|
|
@@ -320,7 +329,15 @@ class Task(Process):
|
|
|
320
329
|
raise OSError(f"未知条件: {key}, 请检查此种条件是否在配置内")
|
|
321
330
|
return True
|
|
322
331
|
|
|
323
|
-
def
|
|
332
|
+
def _component_cust_action_v2(self, action: str):
|
|
333
|
+
profile, _ = self.get_profile_config()
|
|
334
|
+
for name in os.listdir(self.customization_dir):
|
|
335
|
+
path_dir = os.path.join(self.customization_dir, name)
|
|
336
|
+
self.info(f"开始执行组件 {name} 定制化 {action},定制脚本 {path_dir}/include/customization.py")
|
|
337
|
+
post = ComponentPost(self.config, path_dir, profile)
|
|
338
|
+
post.post_work(os.getcwd(), action)
|
|
339
|
+
|
|
340
|
+
def _component_cust_action_v1(self, action: str):
|
|
324
341
|
conan_install = f"{self.config.build_path}/conan_install"
|
|
325
342
|
|
|
326
343
|
# 优先处理rootfs定制化脚本
|
|
@@ -344,6 +361,12 @@ class Task(Process):
|
|
|
344
361
|
post = ComponentPost(self.config, os.path.join(conan_install, comp), profile)
|
|
345
362
|
post.post_work(os.getcwd(), action)
|
|
346
363
|
|
|
364
|
+
def _component_cust_action(self, action: str):
|
|
365
|
+
if misc.conan_v2():
|
|
366
|
+
return self._component_cust_action_v2(action)
|
|
367
|
+
else:
|
|
368
|
+
return self._component_cust_action_v1(action)
|
|
369
|
+
|
|
347
370
|
def _local_signature(self, unsigned_file, cms_output, crl_output, ca_output):
|
|
348
371
|
"""自签名方法"""
|
|
349
372
|
self_sign_config = self.config.bconfig.hpm_self_sign
|