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
=== modified file 'config.yaml'
--- config.yaml 2014-05-08 18:07:49 +0000
+++ config.yaml 2014-06-19 20:05:02 +0000
@@ -24,3 +24,7 @@
24 type: boolean24 type: boolean
25 default: true25 default: true
26 description: "If enabled, run dist-clean when updating source code."26 description: "If enabled, run dist-clean when updating source code."
27 develop-install:
28 type: boolean
29 default: false
30 description: "If enabled, install in develop mode."
2731
=== modified file 'hooks/common.py'
--- hooks/common.py 2014-06-18 14:19:08 +0000
+++ hooks/common.py 2014-06-19 20:05:02 +0000
@@ -122,11 +122,12 @@
122 call_bzr(['revert', os.path.join(PROJECT_DIR, 'resources')])122 call_bzr(['revert', os.path.join(PROJECT_DIR, 'resources')])
123123
124124
125def install_production(dist_clean):125def install_production(dist_clean, develop):
126 subprocess.check_call(['make', 'deploydeps'], cwd=PROJECT_DIR)126 subprocess.check_call(['make', 'deploydeps'], cwd=PROJECT_DIR)
127 if dist_clean:127 if dist_clean:
128 subprocess.check_call(['make', 'distclean'], cwd=PROJECT_DIR)128 subprocess.check_call(['make', 'distclean'], cwd=PROJECT_DIR)
129 subprocess.check_call(['make', 'prodinstall'], cwd=PROJECT_DIR)129 target = 'install' if develop else 'prodinstall'
130 subprocess.check_call(['make', target], cwd=PROJECT_DIR)
130 subprocess.check_call(['apt-get', 'autoremove', '--yes'])131 subprocess.check_call(['apt-get', 'autoremove', '--yes'])
131132
132133
@@ -194,7 +195,7 @@
194 hookenv.log('Incomplete config: source')195 hookenv.log('Incomplete config: source')
195 return196 return
196 update_source(config['source'], config['revno'])197 update_source(config['source'], config['revno'])
197 install_production(config['dist-clean'])198 install_production(config['dist-clean'], config['develop-install'])
198 if mongo_url == '':199 if mongo_url == '':
199 hookenv.log('No mongodb set up.')200 hookenv.log('No mongodb set up.')
200 return201 return

Subscribers

People subscribed via source and target branches

to all changes: