Merge lp:~jtv/launchpad/pre-832647 into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | William Grant | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 13911 | ||||
Proposed branch: | lp:~jtv/launchpad/pre-832647 | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
502 lines (+280/-65) 5 files modified
lib/lp/archivepublisher/domination.py (+122/-50) lib/lp/archivepublisher/tests/test_dominator.py (+150/-2) lib/lp/soyuz/interfaces/publishing.py (+0/-3) lib/lp/soyuz/model/publishing.py (+4/-4) scripts/gina.py (+4/-6) |
||||
To merge this branch: | bzr merge lp:~jtv/launchpad/pre-832647 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
William Grant | code | Approve | |
Review via email: mp+74087@code.launchpad.net |
Commit message
[r=wgrant][bug=832647] Rearrange bits of domcination and gina.
Description of the change
= Summary =
Moving some code about to prepare for the introduction of domination into gina.
== Pre-implementation notes ==
This is the product of extensive discussions with William and Julian, but I'm sort of empty right now and can't reproduce it all! The upshot of it is that they both think what I'm trying to do in the larger picture would work.
== Implementation details ==
The gina changes aren't very important; they're basically just putting the horse back before the cart.
Then there's the publisher changes: a base class has 2 child classes, BPPH and SPPH. (Or more formally, BinaryPackagePu
But the main course is in the dominator. Code in this class is very aggressively unified between BPPH and SPPH. That makes it a little harder to work with. I extracted the specializations away underneath a separate class, really a sub-module of helper functions that hide the differences between BPPH and SPPH. And finally I extracted a few smaller helpers that exploratory coding reveals a need for, and which I think help make the code more readable.
== Tests ==
{{{
./bin/test -vvc lp.archivepublisher
./bin/test -vvc lp.soyuz
}}}
= Launchpad lint =
Nothing to do about the remaining lint, I think; it was all present before I started. Last I heard, someone or other was working to retract the "two spaces" rule so I did nothing about them.
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
scripts/gina.py
lib/lp/
./lib/lp/
381: E261 at least two spaces before inline comment
478: E261 at least two spaces before inline comment
511: E261 at least two spaces before inline comment
681: E261 at least two spaces before inline comment
767: E261 at least two spaces before inline comment
./scripts/gina.py
26: '_pythonpath' imported but unused
189 + def _composeActiveS ourcePubsCondit ion(self, distroseries, pocket):
It seems slightly odd to have this take distroseries and pocket, but grab archive from self. This is a common problem in Soyuz, since archives didn't exist when most of it was written. Something to think about, maybe.
234 + And(join_spr_spn(), join_spph_spr(), spph_location_ clauses) ,
This would possibly be clearer if the order of arguments was reversed. The (SPR, SPN) -> (SPPH, SPR) -> SPPH chaining takes a while to pick up here.
319 + def listCreaitonDat es(self, spphs):
Unused and misspelled :(