CI (DFBSD): workarounds building errors

This commit is contained in:
Carter Li
2026-03-14 15:16:20 +08:00
committed by 李通洲
parent 9af918b1ef
commit 30f32f1fb5
3 changed files with 10 additions and 2 deletions
+4 -2
View File
@@ -305,7 +305,8 @@ if(ENABLE_EMBEDDED_PCIIDS AND NOT EXISTS "${PROJECT_BINARY_DIR}/fastfetch_pciids
RESULT_VARIABLE PYTHON_PCIIDS_RETCODE)
if(NOT PYTHON_PCIIDS_RETCODE EQUAL 0)
file(REMOVE "${PROJECT_BINARY_DIR}/fastfetch_pciids.c.inc")
message(FATAL_ERROR "Failed to generate 'fastfetch_pciids.c.inc'")
message(WARNING "Failed to generate 'fastfetch_pciids.c.inc'")
set(ENABLE_EMBEDDED_PCIIDS OFF)
endif()
else()
message(WARNING "Python3 is not found, 'fastfetch_pciids.c.inc' will not be generated")
@@ -325,7 +326,8 @@ if(ENABLE_EMBEDDED_AMDGPUIDS AND NOT EXISTS "${PROJECT_BINARY_DIR}/fastfetch_amd
RESULT_VARIABLE PYTHON_AMDGPUIDS_RETCODE)
if(NOT PYTHON_AMDGPUIDS_RETCODE EQUAL 0)
file(REMOVE "${PROJECT_BINARY_DIR}/fastfetch_amdgpuids.c.inc")
message(FATAL_ERROR "Failed to generate 'fastfetch_amdgpuids.c.inc'")
message(WARNING "Failed to generate 'fastfetch_amdgpuids.c.inc'")
set(ENABLE_EMBEDDED_AMDGPUIDS OFF)
endif()
else()
message(WARNING "Python3 is not found, 'fastfetch_amdgpuids.c.inc' will not be generated")
+3
View File
@@ -6,6 +6,9 @@ def main(amdgpu_ids_path: str):
with open(amdgpu_ids_path, 'r') as f:
full_text = f.read()
if full_text == '':
sys.exit('Error: pci.ids file is empty')
products = []
for line in full_text.split('\n'):
if not line or line[0] == '#' or not ',\t' in line:
+3
View File
@@ -18,6 +18,9 @@ def main(keep_vendor_list: set, pci_ids_path: str):
with open(pci_ids_path, 'r') as f:
full_text = f.read()
if full_text == '':
sys.exit('Error: pci.ids file is empty')
dev_list_text = full_text[:full_text.rfind('\n\n\n')] # remove known classes
for line in dev_list_text.split('\n'):
if not line or line[0] == '#':