Merge lp:~rvb/launchpad/bug-869221 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Raphaël Badin |
Approved revision: | no longer in the source branch. |
Merged at revision: | 14121 |
Proposed branch: | lp:~rvb/launchpad/bug-869221 |
Merge into: | lp:launchpad |
Diff against target: |
171 lines (+77/-11) 4 files modified
lib/lp/registry/stories/webservice/xx-derivedistroseries.txt (+3/-0) lib/lp/registry/tests/test_initderiveddistroseries.py (+5/-3) lib/lp/soyuz/scripts/initialize_distroseries.py (+28/-3) lib/lp/soyuz/scripts/tests/test_initialize_distroseries.py (+41/-5) |
To merge this branch: | bzr merge lp:~rvb/launchpad/bug-869221 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Julian Edwards (community) | Approve | ||
Review via email: mp+78548@code.launchpad.net |
Commit message
[r=julian-edwards][bug=869221][incr] Raise a proper error when a derived series won't be able to have an architecture to build architecture independent binaries.
Description of the change
Before that branch, the arch independent builder for the derived series was simply taken from the first parent, no question asked. This is obviously a problem if the architecture in question was not among the architectures selected for the derived series.
This branch fixes that:
- In the case of multiple parents, we try to find a candidate for the child's nominatedarch.
- If this list is empty a proper error is raised.
A following branch will force the user to include a proper architecture in the list of the selected archtectures on the +initseries.
= Tests =
./bin/test -vvc test_initialize
./bin/test -vvc test_initialize
= QA =
*Test 1*
Initialize a series with architectures 'a' and 'b' ('b' being the arch indep one). Only select architecture 'a' for the child. The init job should error with the proper error message: "The distroseries has no architectures selected to build architecture independent binaries."
*Test 2*
Initialize a series from 2 parents: p1 and p2, p1 having two archtectures 'a' and 'b' ('b' being the arch indep one) and p2 having one architecture 'a' ('a' being - obviously - the arch indep one). Then initialize a child with only architecture 'a'. This should succeed and the nominatedarchindep for the resulting child should be 'a'.
19 + if (len(potential_ nominated_ arches) == 0): rror(
20 + raise InitializationE
21 + ("The distroseries has no architectures selected to "
22 + "build architecture independent binaries."))
Nit - too many parentheses here, on all four lines :)
Everything else looks great, thanks!