usertools: check for pci.ids in /usr/share/misc

Debian and Ubuntu switched years ago from /usr/share/hwdata to
/usr/share/misc, and the former is just a compat symlink now.
We are starting to get bug reports to nudge us into changing.
So check the new path first, and the old one as a fallback.

Cc: stable@dpdk.org

Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
Acked-by: David Marchand <david.marchand@redhat.com>
This commit is contained in:
Luca Boccassi 2020-03-12 16:30:27 +00:00 committed by David Marchand
parent a658775c57
commit 2ad9f1fab8

View File

@ -561,7 +561,10 @@ def main(stream=None):
pcifile_default = "./pci.ids" # For unknown OS's assume local file
if platform.system() == 'Linux':
pcifile_default = "/usr/share/hwdata/pci.ids"
# hwdata is the legacy location, misc is supported going forward
pcifile_default = "/usr/share/misc/pci.ids"
if not os.path.exists(pcifile_default):
pcifile_default = "/usr/share/hwdata/pci.ids"
elif platform.system() == 'FreeBSD':
pcifile_default = "/usr/local/share/pciids/pci.ids"
if not os.path.exists(pcifile_default):