Merge lp:~thedac/charms/precise/errors/set-django-version into lp:~daisy-pluckers/charms/precise/errors/trunk

Proposed by David Ames on 2014-03-19
Status: Merged
Merged at revision: 36
Proposed branch: lp:~thedac/charms/precise/errors/set-django-version
Merge into: lp:~daisy-pluckers/charms/precise/errors/trunk
Diff against target: 48 lines (+15/-0)
3 files modified
config.yaml (+6/-0)
hooks/common (+2/-0)
hooks/install (+7/-0)
To merge this branch: bzr merge lp:~thedac/charms/precise/errors/set-django-version
Reviewer Review Type Date Requested Status
Brian Murray 2014-03-19 Approve on 2014-03-19
Review via email: mp+211778@code.launchpad.net

Description of the change

Set the specific python-django version of the package and hold it at that version

To post a comment you must log in.
review: Approve
37. By David Ames on 2014-03-19

Fix typo

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config.yaml'
2--- config.yaml 2014-03-07 20:03:17 +0000
3+++ config.yaml 2014-03-19 17:17:04 +0000
4@@ -62,6 +62,12 @@
5 type: string
6 default: 'ppa:daisy-pluckers/daisy-seeds'
7 description: The location for the daisy-dependencies package.
8+ django_repository:
9+ type: string
10+ description: The apt repository for python-django
11+ django_version:
12+ type: string
13+ description: The package version of python-django to install and hold
14 openid_trust_root:
15 type: string
16 default: 'http://errors.staging.ubuntu.com/'
17
18=== modified file 'hooks/common'
19--- hooks/common 2014-03-17 16:09:32 +0000
20+++ hooks/common 2014-03-19 17:17:04 +0000
21@@ -25,6 +25,8 @@
22 ERROR_CODE_DIRS="$(config-get error_code_dirs)"
23 REGION="$(config-get region)"
24 NRPE_URL_CHECK_PARAMS="$(config-get nrpe_url_check_params)"
25+DJANGO_REPOSITORY="$(config-get django_repository)"
26+DJANGO_VERSION="$(config-get django_version)"
27
28 save_setting () {
29 key="$1"
30
31=== modified file 'hooks/install'
32--- hooks/install 2013-05-03 11:02:27 +0000
33+++ hooks/install 2014-03-19 17:17:04 +0000
34@@ -17,7 +17,14 @@
35 fi
36
37 add-apt-repository "$(config-get repository)"
38+if [ -n "$DJANGO_REPOSITORY" ]; then
39+ add-apt-repository "$DJANGO_REPOSITORY"
40+fi
41 apt-get update
42+if [ -n "$DJANGO_VERSION" ]; then
43+ DEBCONF_FRONTEND=noninteractive apt-get install -y python-django=${DJANGO_VERSION}
44+ echo "python-django hold" | dpkg --set-selections
45+fi
46 DEBCONF_FRONTEND=noninteractive apt-get install -y errors-dependencies
47
48 # Create groups

Subscribers

People subscribed via source and target branches

to all changes: