Merge lp:~abentley/charms/precise/juju-reports/develop-install into lp:~juju-qa/charms/precise/juju-reports/trunk

Proposed by Aaron Bentley
Status: Merged
Merged at revision: 34
Proposed branch: lp:~abentley/charms/precise/juju-reports/develop-install
Merge into: lp:~juju-qa/charms/precise/juju-reports/trunk
Diff against target: 39 lines (+8/-3)
2 files modified
config.yaml (+4/-0)
hooks/common.py (+4/-3)
To merge this branch: bzr merge lp:~abentley/charms/precise/juju-reports/develop-install
Reviewer Review Type Date Requested Status
Curtis Hovey (community) code Approve
Review via email: mp+223815@code.launchpad.net

This proposal supersedes a proposal from 2014-06-19.

Description of the change

This branch allows juju-reports to be installed in develop mode.

This is already possible to do after-the-fact, by running "make develop", but the charm has a tendency to re-do the install, breaking this.

To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) wrote :

Thank you.

review: Approve (code)

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-05-08 18:07:49 +0000
3+++ config.yaml 2014-06-19 20:05:02 +0000
4@@ -24,3 +24,7 @@
5 type: boolean
6 default: true
7 description: "If enabled, run dist-clean when updating source code."
8+ develop-install:
9+ type: boolean
10+ default: false
11+ description: "If enabled, install in develop mode."
12
13=== modified file 'hooks/common.py'
14--- hooks/common.py 2014-06-18 14:19:08 +0000
15+++ hooks/common.py 2014-06-19 20:05:02 +0000
16@@ -122,11 +122,12 @@
17 call_bzr(['revert', os.path.join(PROJECT_DIR, 'resources')])
18
19
20-def install_production(dist_clean):
21+def install_production(dist_clean, develop):
22 subprocess.check_call(['make', 'deploydeps'], cwd=PROJECT_DIR)
23 if dist_clean:
24 subprocess.check_call(['make', 'distclean'], cwd=PROJECT_DIR)
25- subprocess.check_call(['make', 'prodinstall'], cwd=PROJECT_DIR)
26+ target = 'install' if develop else 'prodinstall'
27+ subprocess.check_call(['make', target], cwd=PROJECT_DIR)
28 subprocess.check_call(['apt-get', 'autoremove', '--yes'])
29
30
31@@ -194,7 +195,7 @@
32 hookenv.log('Incomplete config: source')
33 return
34 update_source(config['source'], config['revno'])
35- install_production(config['dist-clean'])
36+ install_production(config['dist-clean'], config['develop-install'])
37 if mongo_url == '':
38 hookenv.log('No mongodb set up.')
39 return

Subscribers

People subscribed via source and target branches

to all changes: