Re: usbutils 0.81 release

From: BjÃrn Mork
Date: Thu Apr 30 2009 - 04:30:46 EST


Henrique de Moraes Holschuh
<hmh@xxxxxxxxxx> writes:

> Debian places it in /var/lib/usbids/ for a good reason. So does Ubuntu.
> Both have working "update-usbids" scripts (might be the one from upstream,
> or something different). They also have the original file in /usr/share, I
> don't know if usbutils was changed to check /var first then /usr, or what.

No. They place a symlink from /usr/share to /var/lib:

bjorn@nemi:~$ ls -l /usr/share/misc/usb.ids
lrwxrwxrwx 1 root root 25 2009-01-24 01:36 /usr/share/misc/usb.ids -> /var/lib/usbutils/usb.ids
bjorn@nemi:~$ dpkg -S /usr/share/misc/usb.ids
usbutils: /usr/share/misc/usb.ids

The symlink is probably there for compatibility with other (possibly
non-Debian) utilities. Debian usbutils does not use the /usr/share path
itself:

bjorn@nemi:~$ strings /usr/sbin/lsusb |grep usb.ids
./usb.ids
./usb.ids.gz
/var/lib/usbutils/usb.ids
/var/lib/usbutils/usb.ids.gz

However, looks like the Debian hal uses it. That's probably the main
reason for the symlink:

bjorn@nemi:~$ strings /usr/sbin/hald |grep usb.ids
/usr/share/misc/usb.ids
Couldn't stat usb.ids file '%s', errno=%d: %s
Couldn't open usb.ids file '%s', errno=%d: %s
Couldn't mmap usb.ids file '%s', errno=%d: %s
usb_ids_load


BjÃrn

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/