Merge lp:~roadmr/checkbox/modalias-parsing into lp:checkbox
Status: | Merged |
---|---|
Approved by: | Zygmunt Krynicki |
Approved revision: | 3760 |
Merged at revision: | 3759 |
Proposed branch: | lp:~roadmr/checkbox/modalias-parsing |
Merge into: | lp:checkbox |
Diff against target: |
66 lines (+40/-0) 3 files modified
checkbox-support/checkbox_support/parsers/submission.py (+2/-0) checkbox-support/checkbox_support/parsers/tests/fixtures/submission_packages_modaliases.xml (+20/-0) checkbox-support/checkbox_support/parsers/tests/test_submission.py (+18/-0) |
To merge this branch: | bzr merge lp:~roadmr/checkbox/modalias-parsing |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Zygmunt Krynicki (community) | Approve | ||
Review via email: mp+258498@code.launchpad.net |
Commit message
checkbox-
Description of the change
checkbox-
A "modalias" element is added to the package's data dict if the xml
element contains that property, taken from the package's Modalias Debian
control field.
This actually processes the new "modalias" data from package_resource at submission parsing time. As an example, when parsing, a package without modaliases looks like this:
{
},
One with modaliases is like this:
{
},
Users of the SubmissionParser such as hexr will receive this data and are then responsible for processing it suitably.
This shouldn't affect hexr until we actually add awareness of this key, because currently it only pays attention to the name and version keys of the dictionary, any additions are ignored at the moment.
16:31 <@zyga> roadmr: http:// bazaar. launchpad. net/~roadmr/ checkbox/ modalias- parsing/ revision/ 3760
16:31 <@zyga> roadmr: how is package_version related to the modalias?
16:33 < roadmr> zyga: good question... I think this is designed to express a package (identified by name) and convey that we may have different versions of the same package
16:33 < roadmr> zyga: this reflects how it's stored in hexr's database where there's a package table with just the names, and a packageversion intermediate table with versions and a link to packages
16:33 < roadmr> zyga: in here, a particular package version may contain a specific set of modaliases for which the package provides drivers or functionality
16:34 < roadmr> zyga: this is somewhat tied to version because conceivably a newer version of the same package may have a different set of modaliases
16:34 < roadmr> zyga: but mostly I think it's a "historical naming" convention, I would just call it "package" and it would have "name", "version" and "modalias" attributes
16:48 <@zyga> roadmr: ok, thanks
16:48 < roadmr> zyga: np, thanks for the review :D