提交 4bd3e5a3 编写于 作者: L lwx1153805

Descriptor: can't find vendor during system component compilation

issue:https://gitee.com/openharmony/build/issues/I6CDFX?from=project-issueSigned-off-by: Nlwx1153805 <longshining2@huawei.com>
上级 12c9f8a1
......@@ -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
......
......@@ -83,29 +83,30 @@ 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')
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', '')
}
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.
先完成此消息的编辑!
想要评论请 注册