Merge lp:~jtv/launchpad/bug-802840 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Graham Binns |
Approved revision: | no longer in the source branch. |
Merged at revision: | 13372 |
Proposed branch: | lp:~jtv/launchpad/bug-802840 |
Merge into: | lp:launchpad |
Diff against target: |
103 lines (+49/-9) 4 files modified
lib/lp/soyuz/model/packagecopyjob.py (+4/-8) lib/lp/soyuz/model/queue.py (+1/-1) lib/lp/soyuz/tests/test_packagecopyjob.py (+34/-0) lib/lp/soyuz/tests/test_packageupload.py (+10/-0) |
To merge this branch: | bzr merge lp:~jtv/launchpad/bug-802840 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Graham Binns (community) | code | Approve | |
Review via email: mp+66775@code.launchpad.net |
Commit message
Ignore None component/section on sync upload source override.
Description of the change
= Summary =
When setting an override on a sync-type package upload, leaving out the component causes an oops during the component permissions check.
(Background note: an override sets the upload's component and section).
== Proposed fix ==
Treat the None component setting as "no change," which is permitted.
== Pre-implementation notes ==
Discussed with Julian. Proper behaviour is to permit the change as long as the usual permission check on the existing component still passes. If it doesn't, then the entire override attempt will (and should) still fail. There is no similar check for sections; the component permission check basically verifies whether you are allowed to set overrides in the current component.
== Implementation details ==
An "or" in the "if" would have required a line break or a helper variable. I just appended None to the list of valid components.
== Tests ==
{{{
./bin/test -vvc lp.soyuz.
./bin/test -vvc lp.soyuz.
}}}
== Demo and Q/A ==
Set an override on a sync-type package upload on the +queue page (you recognize these by the fact that the name of the upload is not a link) but set no component. This should now work.
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
From IRC:
<gmb> jtv: Lazy reviewer alert: Those tests could do with some leading comments. I know you've tried to make the test names meaningful and descriptive, but it still took me several seconds to parse them, and I'm fundamentally lazy.
Other than that, r=me.