/usr/sbin/update-usbids.sh doesn't handle gzip usb.ids file from http://www.linux-usb.org/usb.ids
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
usbutils (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: usbutils
http://
the following revised script will successfully download the usb.ids file:
#!/bin/sh
# see also update-pciids.sh (fancier)
[ "$1" = "-q" ] && quiet="true" || quiet="false"
set -e
SRC="http://
DEST=/var/
# if usb.ids is read-only (because the filesystem is read-only),
# then just skip this whole process.
if ! touch ${DEST} >&2 >/dev/null ; then
${quiet} || echo "${DEST} is read-only, exiting."
exit 0
fi
if which wget >/dev/null 2>&1 ; then
DL="wget -O $DEST.new.gz $SRC"
${quiet} && DL="$DL -q"
elif which lynx >/dev/null 2>&1 ; then
DL="eval lynx -source $SRC >$DEST.new.gz"
else
echo >&2 "update-usbids: cannot find wget nor lynx"
exit 1
fi
if ! $DL ; then
echo >&2 "update-usbids: download failed"
rm -f $DEST.new
exit 1
fi
gunzip $DEST.new.gz
if ! grep >/dev/null "^C " $DEST.new ; then
echo >&2 "update-usbids: missing class info, probably truncated file"
exit 1
fi
if [ -f $DEST ] ; then
mv $DEST $DEST.old
# --reference is supported only by chmod from GNU file, so let's ignore any errors
chmod -f --reference=
fi
mv $DEST.new $DEST
${quiet} || echo "Done."
ProblemType: Bug
Architecture: amd64
Date: Wed Feb 17 23:10:03 2010
DistroRelease: Ubuntu 9.10
NonfreeKernelMo
Package: usbutils 0.82-0ubuntu1 [modified: usr/sbin/
ProcEnviron:
LANGUAGE=
LANG=en_NZ.UTF-8
SHELL=/bin/bash
ProcVersionSign
SourcePackage: usbutils
Uname: Linux 2.6.31-19-generic x86_64
XsessionErrors:
(firefox:10801): GLib-WARNING **: g_set_prgname() called multiple times
(polkit-
(firefox:10846): GLib-WARNING **: g_set_prgname() called multiple times
There has been a configuration issue with the linux-usb.org webserver. If you were behind a proxy, it was possible to receive a gzip encoded response even if the client (wget) didn't indicate support for such. The issue has been resolved recently.
See https:/ /sourceforge. net/p/forge/ site-support/ 16108/ for details.