Merge lp:~adeuring/charmworld/proof-lib-path into lp:~juju-jitsu/charmworld/trunk

Proposed by Abel Deuring
Status: Merged
Approved by: Abel Deuring
Approved revision: 403
Merged at revision: 405
Proposed branch: lp:~adeuring/charmworld/proof-lib-path
Merge into: lp:~juju-jitsu/charmworld/trunk
Diff against target: 28 lines (+5/-2)
2 files modified
charmworld/jobs/config.py (+4/-1)
charmworld/jobs/ingest.py (+1/-1)
To merge this branch: bzr merge lp:~adeuring/charmworld/proof-lib-path
Reviewer Review Type Date Requested Status
Abel Deuring (community) Approve
Benji York (community) Approve
Review via email: mp+188871@code.launchpad.net

Commit message

Try two possible locations for the charm-tools library.

Description of the change

Running ingest with up-to-date packages leads to the error message "No proofer".

The reason is that charmworld.jobs.config specifies the location for the library as '/usr/share/charm-tools/scripts' (correct for older versions od the charm-tools package), while recent version of this package from the juju PPA store the libraries in /usr/lib/python2.7/dist-packages/charmtools .

This branch checks if the new directory exists and if so, uses it.

To post a comment you must log in.
Revision history for this message
Benji York (benji) wrote :

The branch looks good.

I would capitalize the sentence on line 9 of the diff.

review: Approve
403. By Abel Deuring

typo fixed.

Revision history for this message
Abel Deuring (adeuring) :
review: Approve
Revision history for this message
Aaron Bentley (abentley) wrote :

Also at 9, it should be "version", not "verion".

404. By Abel Deuring

antoher typo fixed.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'charmworld/jobs/config.py'
--- charmworld/jobs/config.py 2013-07-18 20:25:16 +0000
+++ charmworld/jobs/config.py 2013-10-07 10:17:39 +0000
@@ -28,7 +28,10 @@
28 settings.get('mongo.port')))28 settings.get('mongo.port')))
29DB_NAME = settings.get('mongo.database')29DB_NAME = settings.get('mongo.database')
3030
31CHARM_PROOF_PATH = '/usr/share/charm-tools/scripts'31# The charm-tools library location changed in version 1.0.
32CHARM_PROOF_PATH = '/usr/lib/python2.7/dist-packages/charmtools'
33if not os.path.isdir(CHARM_PROOF_PATH):
34 CHARM_PROOF_PATH = '/usr/share/charm-tools/scripts/lib'
3235
33STORE_URL = 'https://store.juju.ubuntu.com'36STORE_URL = 'https://store.juju.ubuntu.com'
3437
3538
=== modified file 'charmworld/jobs/ingest.py'
--- charmworld/jobs/ingest.py 2013-09-04 22:56:40 +0000
+++ charmworld/jobs/ingest.py 2013-10-07 10:17:39 +0000
@@ -476,7 +476,7 @@
476 if new_path not in sys.path:476 if new_path not in sys.path:
477 sys.path.append(new_path)477 sys.path.append(new_path)
478 try:478 try:
479 import lib.proof as prooflib479 import proof as prooflib
480 yield prooflib480 yield prooflib
481 except ImportError:481 except ImportError:
482 yield None482 yield None

Subscribers

People subscribed via source and target branches