Merge lp:~adeuring/launchpad/test-hwsubm into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Abel Deuring | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 13822 | ||||
Proposed branch: | lp:~adeuring/launchpad/test-hwsubm | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
239 lines (+124/-14) 5 files modified
lib/canonical/launchpad/scripts/hardware-1_0.rng (+11/-5) lib/canonical/launchpad/scripts/tests/test_hwdb_submission_parser.py (+38/-0) lib/canonical/launchpad/scripts/tests/test_hwdb_submission_processing.py (+37/-0) lib/lp/hardwaredb/scripts/hwdbsubmissions.py (+29/-3) lib/lp/hardwaredb/tests/test_hwdb_submission_validation.py (+9/-6) |
||||
To merge this branch: | bzr merge lp:~adeuring/launchpad/test-hwsubm | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Francis J. Lacoste (community) | Approve | ||
Review via email: mp+73294@code.launchpad.net |
Commit message
[r=flacoste][bug=835103] allow to process HWDB submissions from the checkbox version in Lucid, Maverick, Natty.
Description of the change
This branch allows to parse HWDB reports that come from the Maverick and Natty versions of checkbox. These versions do not provide information we need to store data about SCSI devices in the hardwrae database: the reports have no <sysfs-qttributes> node. This node is supposed to be the source for the vendor annd model name of SCSI devcies.
We could still get the vendor/model name for block devices, by looking into sub-nodes of the "main" udev node for these devcies, but:
- we urgently need a fix
- Data about SCSI block devcies is probably the least interesting data; more intersting are other devices, like tape robots or scanners: support tends to be more fragile that support for disks or CD drives.
This branch changes the RelaxNG schema so that raw submissions without a <sysfs-attributes> node pass; it ensures that the further porcessing of the data works.
The main change is in is_scsi_device (@@ -2731,6 +2747,12 @@): This property is used by the proeprty scsi_vendor and scsi_model to check if the vendor/model name exist; if the latter properties are None, the "potential scsi device" is not considered to be a SCSI devcie, an no data about is stored.
("Potential SCSI devices": Many non-SCSI devices, like ATA disks, USB disks or USB card readers, use the SCSI command set to communicate with the host computer. These devices are treated like real SCSI devcies, but they don't have the sysfs attributes vendor/model; this is already used by the HWDB submission processing script to decide, if data about a given "potentail SCSI device" should be stored.
<flacoste> adeuring: just FYI, Lucid is also affected, we have very few valid Lucid submissions, and I guess they date from before the problematic checkbox changes
<adeuring> flacoste: right; I'll check a few lucid reports too
<flacoste> adeuring: do we have hwdb integration tests? If we do, is it worth adding one for a problematic report?
<adeuring> flacoste: right, I am aware that such a test is missing -- the main point is: I am too tired to write one today...
<flacoste> adeuring: but do we have such tests already?
<adeuring> flacoste: only one or two: for correct data and for "trivially wrong data", IIRC
<flacoste> adeuring: ok
<flacoste> adeuring: r=me with the note that Lucid and later are affected, and with a reference to the bug report