Merge lp://staging/~jtv/launchpad/db-bug-771727 into lp://staging/launchpad/db-devel
Status: | Merged |
---|---|
Approved by: | Robert Collins |
Approved revision: | no longer in the source branch. |
Merged at revision: | 10485 |
Proposed branch: | lp://staging/~jtv/launchpad/db-bug-771727 |
Merge into: | lp://staging/launchpad/db-devel |
Diff against target: |
61 lines (+14/-5) 2 files modified
lib/lp/archivepublisher/scripts/generate_contents_files.py (+2/-5) lib/lp/archivepublisher/tests/test_generate_contents_files.py (+12/-0) |
To merge this branch: | bzr merge lp://staging/~jtv/launchpad/db-bug-771727 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Collins (community) | Approve | ||
Review via email: mp+59203@code.staging.launchpad.net |
Commit message
[r=lifeless][bug=771727] Also generate contents for the release pocket.
Description of the change
= Summary =
The new, python-based generate-
The cause: the old script used lp-query-distro to get the distribution's pocket suffixes *except the empty ones* (the release pocket doesn't have a suffix) and then computed the distribution's suites by adding the suite name, plus for each pocket suffix, the suite with the pocket suffix attached. So effectively we had code to take the release pocket out of the list and then other code to put it back in. In converting the bash code to python I missed this subtlety.
== Proposed fix ==
Don't use LpQueryDistro at all. Use what it uses: pocketsuffix.
== Pre-implementation notes ==
Spotted by wgrant. At first we thought the empty suffix was lost in split()ing the output from LpQueryDistro. But since it would be (both in a python split() and in a shell script) the empty suffix wasn't even in there.
== Implementation details ==
The method wasn't individually tested, so that part is easy. I added a test to prove that the release pocket is included, which duly fails without the fix.
== Tests ==
{{{
./bin/test -vvc lp.archivepubli
}}}
== Demo and Q/A ==
Apart from this, the script seems to work. Both Julian and William have tried it on dogfood.
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
Jeroen