Merge lp://staging/~sinzui/juju-release-tools/build-package-print into lp://staging/juju-release-tools

Proposed by Curtis Hovey
Status: Merged
Merged at revision: 246
Proposed branch: lp://staging/~sinzui/juju-release-tools/build-package-print
Merge into: lp://staging/juju-release-tools
Diff against target: 241 lines (+120/-21)
5 files modified
Makefile (+7/-2)
assemble-streams.bash (+3/-8)
build_package.py (+50/-2)
supported-releases.txt (+0/-9)
tests/test_build_package.py (+60/-0)
To merge this branch: bzr merge lp://staging/~sinzui/juju-release-tools/build-package-print
Reviewer Review Type Date Requested Status
Aaron Bentley (community) Approve
Review via email: mp+282020@code.staging.launchpad.net

Description of the change

Make build_package.py the only source for juju series information.

We want to stop building and testing vivid, but before we do, We want a single definition of the series Juju supports. This branch removes supported-releases.txt. To do so, assemble-streams.bash call a new build_package.py command to print the series associated with the package version.

The JujuSeries class gained three new methods, two of which I think we probably wont need. The crucial method is get_name_from_package_version() which matches a series name to a series version in the package version. This logic is simpler that the bash rules. The previous rules dealt with the case where agents were created from Ubuntu packages. The Ubuntu devel series never has a series version embedded in the package version. We no longer support Ubuntu packages, so I dropped the rule. The new method returns an empty string when no match is found. None would be preferred if other code used this method, but since it exists just for bash to make a decision, I choose the simplest path.

To post a comment you must log in.
Revision history for this message
Aaron Bentley (abentley) wrote :

Nice improvement.

review: Approve
247. By Curtis Hovey

Exit 1 when a --series-name-from-package-version has no match.

248. By Curtis Hovey

Fix quoting.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches