update-pciids weird behavior

Bug #113569 reported by Félix Velasco
4
Affects Status Importance Assigned to Milestone
pciutils (Ubuntu)
Fix Released
Undecided
Unassigned
Trusty
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: pciutils

update-pciids.sh downloads a newer version of the pci.ids file. If available, it first downloads an bzip2 version of the file, then a gzipped one, then the plain text version. Then, it decompresses it and stores it in a plain, uncompressed text file.

However, there is a debian patch that tries to modify it so it keeps the gzipped version. However, the patch doesn't work, and ends creating a /usr/share/misc/pci.ids.gz file, that's not gzipped. lspci however, reads first the .gz, and it works though it's not gzipped. That's why it has gone unnoticed.

Steps to reproduce:
With a clear installation:

$ls -l /usr/share/misc/pci.ids*
-rw-r--r-- 1 root root 428084 2007-03-05 11:51 /usr/share/misc/pci.ids

$ sudo update-pciids
--12:54:47-- http://pciids.sourceforge.net/v2.2/pci.ids.bz2
           => `/usr/share/misc/pci.ids.gz.new'
Resolviendo pciids.sourceforge.net... 66.35.250.209
Conectando a pciids.sourceforge.net|66.35.250.209|:80... conectado.
Petición HTTP enviada, esperando respuesta... 200 OK
Longitud: 120,972 (118K) [text/plain]

100%[=================================================================================================================>] 120,972 21.89K/s ETA 00:00

12:54:53 (21.21 KB/s) - `/usr/share/misc/pci.ids.gz.new' guardado [120972/120972]

Done.

(notice how it downloads the .bz2 version and saves it as .gz.new)
$ ls -l /usr/share/misc/pci.ids*
-rw-r--r-- 1 root root 428084 2007-03-05 11:51 /usr/share/misc/pci.ids
-rw-r--r-- 1 root root 462320 2007-05-09 12:57 /usr/share/misc/pci.ids.gz

$file /usr/share/misc/pci.ids.gz
/usr/share/misc/pci.ids.gz: ASCII English text, with CR, LF line terminators

(notice how /usr/share/misc/pci.ids is untouched, and /usr/share/misc/pci.ids.gz is NOT a gzipped file).

Revision history for this message
Félix Velasco (felix-velasco) wrote :

Sorry, I got some points wrong. There's no debian patch.

The construction process (Makefile) modifies the update-pciids script, setting it to store a .gz file if zlib is available (as detected by lib/configure). However, this is only a cosmetic change, since the file is not gzipped.

Revision history for this message
Stéphane Loeuillet (leroutier) wrote :

/usr/share/misc/pci.ids is not used anymore
You can safely remove it

an update script forgot to do it

--------------------

For the file name, it's unfortunate to end with .gz as it is not compressed but that's not a big deal

Changed in pciutils:
status: Unconfirmed → Confirmed
Revision history for this message
Tim Gardner (timg-tpi) wrote :

Just updated Trusty pciutils which worked fine for me. I didn't find any extraneous files after running update-pciids.sh.

Changed in pciutils (Ubuntu Trusty):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.