Merge lp:~chipaca/snappy/deprecated-architectures into lp:~snappy-dev/snappy/snappy-moved-to-github
| Status: | Merged |
|---|---|
| Approved by: | Sergio Schvezov on 2015-05-05 |
| Approved revision: | 442 |
| Merged at revision: | 439 |
| Proposed branch: | lp:~chipaca/snappy/deprecated-architectures |
| Merge into: | lp:~snappy-dev/snappy/snappy-moved-to-github |
| Prerequisite: | lp:~chipaca/snappy/copyfile |
| Diff against target: |
135 lines (+61/-16) 4 files modified
snappy/build.go (+6/-2) snappy/build_test.go (+6/-0) snappy/snapp.go (+25/-14) snappy/snapp_test.go (+24/-0) |
| To merge this branch: | bzr merge lp:~chipaca/snappy/deprecated-architectures |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Sergio Schvezov | Approve on 2015-05-05 | ||
| Michael Vogt | 2015-05-02 | Needs Information on 2015-05-03 | |
|
Review via email:
|
|||
This proposal supersedes a proposal from 2015-05-02.
Commit Message
Improved parsing of deprecated "architecture" entry of package.yaml.
Description of the Change
Currently, the deprecated "architecture" entry in package.yaml is loaded as an interface{}, and only some of the values therein are considered.
I've had a bit of fun loading arbitrarily large data structures into that before I got bored and fixed it.
Two silly examples of things that should've been failing with an error but weren't are included as tests. One leaves the packageYaml struct with a nil 'Architectures' field (which goes on to cause a panic during build); the other panics in the parser itself. You get to guess which one did which (or you can revert back to the first commit, which is just the tests).
The panic during build is because debArchitecture doesn't check bounds. Not sure what it can do if Architecture is empty on the package, though; have gone with returning "unknown", but maybe we _want_ it to panic there.
Way-too-
| Michael Vogt (mvo) wrote : | # |
Hm, setting to needs information just to be sure that the inline question is not forgotten :)
| Sergio Schvezov (sergiusens) wrote : | # |
looks good and clean, just one comment


Thanks for fixing this! Code looks great, one question inline.