未验证 提交 2b3967a5 编写于 作者: O openharmony_ci 提交者: Gitee

!657 系统组件编译找不到vendor目录

Merge pull request !657 from lwx1153805/lsn_build_lite_0202
......@@ -292,7 +292,7 @@ class Config(metaclass=Singleton):
def vendor_path(self):
_vendor_path = os.path.join(self.root_path, 'vendor')
if not os.path.isdir(_vendor_path):
raise OHOSException(f'Invalid vendor path: {_vendor_path}')
_vendor_path = ''
return _vendor_path
@property
......
......@@ -82,29 +82,31 @@ class Product():
'config': config_path,
'component_type': info.get('component_type', '')
}
for company in os.listdir(config.vendor_path):
company_path = os.path.join(config.vendor_path, company)
if not os.path.isdir(company_path):
continue
if config.vendor_path != '':
for company in os.listdir(config.vendor_path):
company_path = os.path.join(config.vendor_path, company)
if not os.path.isdir(company_path):
continue
for product in os.listdir(company_path):
product_path = os.path.join(company_path, product)
config_path = os.path.join(product_path, 'config.json')
if os.path.isfile(config_path):
info = read_json_file(config_path)
product_name = info.get('product_name')
if product_name is not None:
yield {
'company': company,
"name": product_name,
'product_config_path': product_path,
'product_path': product_path,
'version': info.get('version', '3.0'),
'os_level': info.get('type', "mini"),
'config': config_path,
'component_type': info.get('component_type', '')
}
for product in os.listdir(company_path):
product_path = os.path.join(company_path, product)
config_path = os.path.join(product_path, 'config.json')
if os.path.isfile(config_path):
info = read_json_file(config_path)
product_name = info.get('product_name')
if product_name is not None:
yield {
'company': company,
"name": product_name,
'product_config_path': product_path,
'product_path': product_path,
'version': info.get('version', '3.0'),
'os_level': info.get('type', "mini"),
'config': config_path,
'component_type': info.get('component_type', '')
}
bip_path = config.built_in_product_path
for item in os.listdir(bip_path):
if item[0] in ".":
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册