From: Vasilis Tsiligiannis Date: Tue, 11 Aug 2009 23:37:49 +0000 (+0000) Subject: [packages] usbutils: Create gziped list when updating IDs, bump release number X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=4755f41184959d33edb0eedacc16eaffb26c50ae;hp=e4756349993f81844b187132f3ea9a6d1469c08c [packages] usbutils: Create gziped list when updating IDs, bump release number SVN-Revision: 17233 --- diff --git a/utils/usbutils/Makefile b/utils/usbutils/Makefile index 4f2728991d..27f15d3857 100644 --- a/utils/usbutils/Makefile +++ b/utils/usbutils/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=usbutils PKG_VERSION:=0.84 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/linux-usb diff --git a/utils/usbutils/patches/110-gzip-update-usbids.patch b/utils/usbutils/patches/110-gzip-update-usbids.patch new file mode 100644 index 0000000000..0e25e5cca6 --- /dev/null +++ b/utils/usbutils/patches/110-gzip-update-usbids.patch @@ -0,0 +1,36 @@ +--- a/update-usbids.sh.in ++++ b/update-usbids.sh.in +@@ -6,9 +6,9 @@ + + set -e + SRC="http://www.linux-usb.org/usb.ids" +-DEST=usb.ids ++DEST=usb.ids.gz + +-# if usb.ids is read-only (because the filesystem is read-only), ++# if usb.ids.gz 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." +@@ -16,10 +16,10 @@ if ! touch ${DEST} >&2 >/dev/null ; then + fi + + if which wget >/dev/null 2>&1 ; then +- DL="wget -O $DEST.new $SRC" ++ DL="eval wget -O- $SRC | gzip >$DEST.new" + ${quiet} && DL="$DL -q" + elif which lynx >/dev/null 2>&1 ; then +- DL="eval lynx -source $SRC >$DEST.new" ++ DL="eval lynx -source $SRC | gzip >$DEST.new" + else + echo >&2 "update-usbids: cannot find wget nor lynx" + exit 1 +@@ -31,7 +31,7 @@ if ! $DL ; then + exit 1 + fi + +-if ! grep >/dev/null "^C " $DEST.new ; then ++if ! zcat $DEST.new | grep >/dev/null "^C " ; then + echo >&2 "update-usbids: missing class info, probably truncated file" + exit 1 + fi