[PATCH] "Fix" bootstrap_pci.py on CentOS 5
Ville Skyttä
ville.skytta at iki.fi
Wed Feb 6 16:29:24 CST 2008
The problems I posted a couple of days ago about firmware-tools 2.0.5 on
CentOS 4 seem to be gone in 2.0.6, but it's still broken on CentOS 5.
Turns out that the lspci in CentOS 5 treats the -nn argument as if -n was
passed, so the vendor name is never there as text. For example:
# /sbin/lspci -nn -m -v -D 2>/dev/null
Device: 0000:00:00.0
Class: 0600
Vendor: 1166
Device: 0008
Rev: 23
[...]
The attached crude patch "fixes" it so that bootstrap_firmware can at least be
run and appears to produce correct results.
Traceback before the patch:
# bootstrap_firmware
Traceback (most recent call last):
File "/usr/sbin/bootstrap_firmware", line 23, in ?
ftmain.main(sys.argv[1:])
File "/usr/share/firmware-tools/ftmain.py", line 99, in main
result, resultmsgs = base.doCommands()
File "<peak.util.decorators.rewrap wrapping cli.doCommands at 0x-48471F9C>",
line 3, in doCommands
File "/usr/lib/python2.4/site-packages/firmwaretools/trace_decorator.py",
line 75, in trace
result = func(*args, **kw)
File "/usr/share/firmware-tools/cli.py", line 133, in doCommands
self.opts.mode, self.fullCmdLine, self.args)
File "<peak.util.decorators.rewrap wrapping bootstrap_cmd.doCommand at
0x-484D7E4C>", line 3, in doCommand
File "/usr/lib/python2.4/site-packages/firmwaretools/trace_decorator.py",
line 75, in trace
result = func(*args, **kw)
File "/usr/share/firmware-tools/plugins/bootstrap_cmd.py", line 58, in
doCommand
for pkg in base.yieldBootstrap():
File "/usr/lib/python2.4/site-packages/firmwaretools/__init__.py", line 237,
in yieldBootstrap
for i in func():
File "/usr/lib/python2.4/site-packages/firmwaretools/bootstrap_pci.py", line
41, in BootstrapGenerator
yield(makePciDevice(i))
File "<peak.util.decorators.rewrap wrapping
firmwaretools.bootstrap_pci.makePciDevice at 0x-484D5E4C>", line 3, in
makePciDevice
File "/usr/lib/python2.4/site-packages/firmwaretools/trace_decorator.py",
line 75, in trace
result = func(*args, **kw)
File "/usr/lib/python2.4/site-packages/firmwaretools/bootstrap_pci.py", line
62, in makePciDevice
kargs["pciVendor_txt"], kargs["pciVendor"] =
splitTextFromNumeric(oneDevData["vendor"])
TypeError: unpack non-sequence
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Workaround-for-lspci-that-treats-nn-as-n.patch
Type: text/x-diff
Size: 1396 bytes
Desc: not available
Url : http://lists.us.dell.com/pipermail/firmware-tools-devel/attachments/20080206/0d382d95/attachment.bin
More information about the firmware-tools-devel
mailing list