未验证 提交 12c9f8a1 编写于 作者: O openharmony_ci 提交者: Gitee

!655 删除产品配置文件version 2.0的支持,产品均已使用version 3.0

Merge pull request !655 from peitaiyi/master
......@@ -304,15 +304,6 @@ class Config(metaclass=Singleton):
f'Invalid built-in product path: {_built_in_product_path}')
return _built_in_product_path
@property
def built_in_device_path(self):
_built_in_device_path = os.path.join(self.root_path,
'productdefine/common/device')
if not os.path.isdir(_built_in_device_path):
raise OHOSException(
f'Invalid built-in product path: {_built_in_device_path}')
return _built_in_device_path
@property
def build_tools_path(self):
try:
......
......@@ -131,20 +131,7 @@ class Product():
config = Config()
version = info.get('version', '3.0')
if version == '2.0':
device_json = os.path.join(config.built_in_device_path,
f'{info["product_device"]}.json')
device_info = read_json_file(device_json)
return {
'board': device_info.get('device_name'),
'kernel': device_info.get('kernel_type', 'linux'),
'kernel_version': device_info.get('kernel_version'),
'company': device_info.get('device_company'),
'board_path': device_info.get('device_build_path'),
'target_cpu': device_info.get('target_cpu'),
'target_os': device_info.get('target_os')
}
elif version == '3.0':
if version == '3.0':
device_company = info.get('device_company')
board = info.get('board')
_board_path = info.get('board_path')
......
......@@ -488,7 +488,6 @@ class Dirs:
self.built_in_product_dir = config.built_in_product_path
self.productdefine_dir = os.path.join(self.source_root_dir,
'productdefine/common')
self.built_in_device_dir = config.built_in_device_path
self.built_in_base_dir = os.path.join(self.productdefine_dir, 'base')
# Configs of vendor specified products are stored in
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册