Gentoo Archives: gentoo-dev

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Resolving HAL vs. pciutils/usbutils
Date: Wed, 31 Oct 2007 01:58:39
Message-Id: 20071031015605.GY22369@curie-int.orbis-terrarum.net
1 Heya,
2
3 So now this is not a flamewar.
4
5 Jakub was originally going to complain at me for the upstream usbutils
6 adding support for gzipped usb.ids files, but a group of us (myself,
7 dsd, jakub, leio, steev) had a discussion about it, and came up with a
8 solution that both ends the breakage for direct users (HAL and others),
9 and provides forward momentum.
10
11 So firstly, what's the real problem? The original complaint came up
12 because HAL expected the uncompressed file to exist as pci.ids, and
13 wasn't ready to look at pci.ids.gz. While this caused breakage, it was
14 only a warning sign that there was a deeper problem.
15
16 libpci exists so that every application that wants to read the pci.ids
17 file does not need to know the format, and so that the pciutils
18 maintainers can change the file format (paired with changing their
19 parsing code), without causing breakage for any other packages.
20
21 HAL is not the only user of pci.ids/usb.ids:
22 http://www.google.com/codesearch?q=%22pci.ids%22
23 http://www.google.com/codesearch?q=%22usb.ids%22
24
25 Here's DSD's original thread on the HAL lists:
26 http://lists.freedesktop.org/archives/hal/2007-June/008834.html
27 And he also noted this, but I don't have a link for it.
28 <dsd_> upstream PCI are going to change the format too, they gave
29 like a years notice
30 Also:
31 <robbat2> dsd_, thanks. so really, once the libpci is installed as
32 a shared lib, there's no reason that HAL shouldn't use it?
33 <dsd_> robbat2: indeed - and nobody actually raised that as an
34 objection, parts of hal already statically link against
35 libpci...
36
37 So at the moment, HAL needs the changes, but the patches have been
38 blocked because pciutils needs move to a shared library and not cause
39 ABI breakages instead of the present static-lib-only situation.
40
41 usbutils is in very similar (but not quite identical) position, they
42 have not yet introduced any library, but will be doing so, to enable
43 similar format changes.
44
45 The solution that the group of us agreed on, was the following:
46 For USE=zlib, pciutils and usbutils should use the .gz version,
47 but ALSO maintain the uncompressed version until all applications
48 have migrated to using the libraries to handle the pci.ids.
49
50 This uses the upstream-preferred formats for download, and stores
51 suitably so that both {pci,usb}utils work, and HAL works as well
52 (without the note about installing pciutils with USE=-zlib). The only
53 download until this transition is finished is using an extra 180Kb on
54 disk for the compressed versions (120Kb for the pci.id.gz and 60Kb for
55 usb.ids.gz).
56
57 Attached is my patch that has pci.ids stored in both styles (also cleans
58 up old .gz files if compression is not being used). I've got it ready to
59 commit to the tree with pciutils-2.2.8, and similarly for usb.ids
60 (pending an ongoing discussion with upstream usbutils about their
61 server-side usb.ids).
62
63 If there is no major dissent when I get up tomorrow, I'll commit this,
64 as the end to the breakage.
65
66 --
67 Robin Hugh Johnson
68 Gentoo Linux Developer & Infra Guy
69 E-Mail : robbat2@g.o
70 GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85

Attachments

File name MIME type
pciutils-2.2.7-update-pciids-both-forms.patch text/plain

Replies

Subject Author
Re: [gentoo-dev] Resolving HAL vs. pciutils/usbutils Daniel Drake <dsd@g.o>