Hi Martin,

I am looking at Debian pciutils bug #411314,

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=411314

and it appears that there are a couple problems causing compressed pci.ids 
files to not work as expected.

1.) update-pciids is not saving the files with the right extension. Here is a 
patch that fixes the naming.

--- update-pciids.sh~   2007-02-23 03:33:32.000000000 -0800
+++ update-pciids.sh    2007-02-23 03:37:21.000000000 -0800
@@ -7,16 +7,21 @@
 GREP=grep
 
 if [ -n "$PCI_COMPRESSED_IDS" ] ; then
+       # Compression explicitly turned off
        DECOMP="cat"
-       SRC="$SRC.gz"
-       GREP=zgrep
-elif which bzip2 >/dev/null ; then
-       DECOMP="bzip2 -d"
-       SRC="$SRC.bz2"
+# For future bzip2 support
+#elif which bzip2 >/dev/null ; then
+#      DECOMP="bzip2 -d"
+#      SRC="$SRC.bz2"
+#      DEST="$DEST.bz2"
+#      GREP=bzgrep
 elif which gzip >/dev/null ; then
        DECOMP="gzip -d"
        SRC="$SRC.gz"
+       DEST="$DEST.gz"
+       GREP=zgrep
 else
+       # Compression on, but we couldn't find it
        DECOMP="cat"
 fi
 
2.) The file at "http://pciids.sourceforge.net/v2.2/pci.ids.gz"; is not 
gzipped. Likewise "http://pciids.sourceforge.net/v2.2/pci.ids.bz2"; is not 
bzip2'd (although that's not an issue yet since we don't have bz2 support). 
Could this be curl/wget or the sf.net web server automatically decompressing?
So when update-pciids grabs them they don't arrive on the system in the right 
format. Due to the naming bug above this wasn't obvious, so when fixing this 
it will mean existing 2.2.4 update-pciid's will be getting "pci.ids" files 
that are compressed. This seems to work fine though.

3.) I think the update-pciids target in the top level Makefile should have a 
dependency on lib/config.mk in order to ensure that PCI_COMPRESSED_IDS is set 
properly (like if you used 'make ZLIB=no update-pciids' on a clean tree)?

Comments?
Thanks,

-- 
Matt Taggart
[EMAIL PROTECTED]




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to