Meta: Put USB and PCI IDs in the right folder in the Build environment

Not sure why that happens and how it worked until now, but we need to be
more precise about the location of PCI and USB IDs when decompressing
them while building the OS.
This commit is contained in:
Liav A 2022-07-27 20:20:17 +03:00 committed by Tim Flynn
parent ef2d4b9ed6
commit 622e3b06ce
Notes: sideshowbarker 2024-07-17 11:06:06 +09:00

View file

@ -250,10 +250,10 @@ if(ENABLE_PCI_IDS_DOWNLOAD AND NOT EXISTS ${PCI_IDS_GZ_PATH})
download_file("${PCI_IDS_GZ_URL}" "${PCI_IDS_GZ_PATH}")
endif()
if(EXISTS ${PCI_IDS_GZ_PATH} AND NOT EXISTS ${PCI_IDS_INSTALL_PATH})
if(EXISTS ${PCI_IDS_GZ_PATH} AND NOT EXISTS ${CMAKE_STAGING_PREFIX}/${PCI_IDS_INSTALL_PATH})
message(STATUS "Extracting PCI ID database from ${PCI_IDS_GZ_PATH}...")
file(MAKE_DIRECTORY "${CMAKE_STAGING_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}")
execute_process(COMMAND "${GZIP_TOOL}" -d -c "${PCI_IDS_GZ_PATH}" OUTPUT_FILE "${PCI_IDS_INSTALL_PATH}")
execute_process(COMMAND "${GZIP_TOOL}" -d -c "${PCI_IDS_GZ_PATH}" OUTPUT_FILE "${CMAKE_STAGING_PREFIX}/${PCI_IDS_INSTALL_PATH}")
endif()
set(USB_IDS_FILE usb.ids)
@ -266,8 +266,8 @@ if(ENABLE_USB_IDS_DOWNLOAD AND NOT EXISTS ${USB_IDS_GZ_PATH})
download_file("${USB_IDS_GZ_URL}" "${USB_IDS_GZ_PATH}")
endif()
if(EXISTS ${USB_IDS_GZ_PATH} AND NOT EXISTS ${USB_IDS_INSTALL_PATH})
if(EXISTS ${USB_IDS_GZ_PATH} AND NOT EXISTS ${CMAKE_STAGING_PREFIX}/${USB_IDS_INSTALL_PATH})
message(STATUS "Extracting USB ID database from ${USB_IDS_GZ_PATH}...")
file(MAKE_DIRECTORY "${CMAKE_STAGING_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}")
execute_process(COMMAND "${GZIP_TOOL}" -d -c "${USB_IDS_GZ_PATH}" OUTPUT_FILE "${USB_IDS_INSTALL_PATH}")
execute_process(COMMAND "${GZIP_TOOL}" -d -c "${USB_IDS_GZ_PATH}" OUTPUT_FILE "${CMAKE_STAGING_PREFIX}/${USB_IDS_INSTALL_PATH}")
endif()