Merge lp://qastaging/~frankban/juju-quickstart/ppa-flag into lp://qastaging/juju-quickstart
Proposed by
Francesco Banconi
Status: | Merged |
---|---|
Merged at revision: | 63 |
Proposed branch: | lp://qastaging/~frankban/juju-quickstart/ppa-flag |
Merge into: | lp://qastaging/juju-quickstart |
Diff against target: |
147 lines (+87/-2) 4 files modified
quickstart/__init__.py (+1/-1) quickstart/manage.py (+31/-1) quickstart/packaging.py (+31/-0) quickstart/tests/test_manage.py (+24/-0) |
To merge this branch: | bzr merge lp://qastaging/~frankban/juju-quickstart/ppa-flag |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju GUI Hackers | Pending | ||
Review via email: mp+214536@code.qastaging.launchpad.net |
Description of the change
Support the --ppa flag for distro packaging.
Add a packaging module suitable for being
easily modified when packaging quickstart for
distro repositories.
The new --ppa flag can be used to switch to ppa
when quickstart is installed from the default
repositories.
Tests: `make check`.
QA: there is no easy way to QA this.
It would require removing juju packages,
running quickstart with and without
the --distro-only and --ppa flags,
switching packaging.py to "distro"
and trying again.
I'll do that anyway as part of the next
release QA, so feel free to avoid QAing now.
To post a comment you must log in.
Reviewers: mp+214536_ code.launchpad. net,
Message:
Please take a look.
Description:
Support the --ppa flag for distro packaging.
Add a packaging module suitable for being
easily modified when packaging quickstart for
distro repositories.
The new --ppa flag can be used to switch to ppa
when quickstart is installed from the default
repositories.
Tests: `make check`.
QA: there is no easy way to QA this.
It would require removing juju packages,
running quickstart with and without
the --distro-only and --ppa flags,
switching packaging.py to "distro"
and trying again.
I'll do that anyway as part of the next
release QA, so feel free to avoid QAing now.
https:/ /code.launchpad .net/~frankban/ juju-quickstart /ppa-flag/ +merge/ 214536
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/84520047/
Affected files (+87, -1 lines): manage. py packaging. py tests/test_ manage. py
A [revision details]
M quickstart/
A quickstart/
M quickstart/
Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision:
<email address hidden>
+New revision:
<email address hidden>
Index: quickstart/ manage. py manage. py' manage. py 2014-03-27 10:38:01 +0000 manage. py 2014-04-07 10:11:34 +0000
parser. exit()
=== modified file 'quickstart/
--- quickstart/
+++ quickstart/
@@ -32,6 +32,7 @@
import quickstart
from quickstart import (
app,
+ packaging,
settings,
utils,
)
@@ -53,6 +54,29 @@
+def _get_packaging_ info(juju_ source) : bundle( options, parser):
+ """Return packaging info based on the given juju source.
+
+ The juju_source argument can be either "ppa" or "distro".
+
+ Packaging info is a tuple containing:
+ - distro_only: whether to install juju-core packages from the
distro
+ repositories or the external PPA;
+ - distro_only_help: the help text for the --distro-only flag;
+ - ppa_help: the help text for the --ppa flag.
+ """
+ distro_only_help = ('Do not use external sources when installing and '
+ 'setting up Juju')
+ ppa_help = 'Use external sources when installing and setting up Juju'
+ if juju_source == 'distro':
+ distro_only = True
+ distro_only_help += '\n(enabled by default, use --ppa to disable)'
+ else:
+ distro_only = False
+ ppa_help += '\n(enabled by default, use --distro-only to disable)'
+ return distro_only, distro_only_help, ppa_help
+
+
def _validate_
"""Validate and process the bundle options.
@@ -317,6 +341,8 @@ env_name = envs.get_ default_ env_name( ) distro_ only, distro_only_help, ppa_help = _get_packaging_ info( JUJU_SOURCE)
Exit with an error if the provided arguments are not valid.
"""
default_
+ default_
+ packaging.
# Define the help message for the --environment option.
env_help = 'The name of the Juju environment to use'
if default_env_name is not None:
@@ -377,7 +403,10 @@
help...