Merge lp:~canonical-ci-engineering/charms/trusty/logstash/local-tarball into lp:~lazypower/charms/trusty/logstash/trunk

Proposed by Celso Providelo
Status: Merged
Merged at revision: 45
Proposed branch: lp:~canonical-ci-engineering/charms/trusty/logstash/local-tarball
Merge into: lp:~lazypower/charms/trusty/logstash/trunk
Diff against target: 22 lines (+6/-6)
1 file modified
hooks/install (+6/-6)
To merge this branch: bzr merge lp:~canonical-ci-engineering/charms/trusty/logstash/local-tarball
Reviewer Review Type Date Requested Status
Charles Butler Approve
Review via email: mp+254639@code.launchpad.net

Commit message

Fixing local tarball/payload installation logic.

Description of the change

Fixing local tarball/payload installation logic.

To post a comment you must log in.
Revision history for this message
Charles Butler (lazypower) wrote :

+1 LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hooks/install'
--- hooks/install 2014-09-23 20:20:33 +0000
+++ hooks/install 2015-03-30 19:49:09 +0000
@@ -83,14 +83,14 @@
83 sha.hexdigest()))83 sha.hexdigest()))
8484
85 # Extract and move into place85 # Extract and move into place
86 extract_package(filename)86 extract_package(fpath)
8787
8888
89def extract_package(filename):89def extract_package(filepath):
90 t = tarfile.open(os.path.join(os.path.sep, 'tmp', filename))90 t = tarfile.open(filepath)
91 t.extractall(path='.')91 t.extractall(path='.')
92 t.close()92 t.close()
93 basename = filename.rsplit('.', 2)[0]93 [basename] = [v for v in os.listdir('.') if v.startswith('logstash-')]
94 shutil.move(basename, BASEPATH)94 shutil.move(basename, BASEPATH)
9595
9696

Subscribers

People subscribed via source and target branches