Merge lp:~mew/charm-helpers/fetchallthethings into lp:charm-helpers
Status: | Merged |
---|---|
Merged at revision: | 48 |
Proposed branch: | lp:~mew/charm-helpers/fetchallthethings |
Merge into: | lp:charm-helpers |
Diff against target: |
150 lines (+41/-15) 4 files modified
charmhelpers/fetch/archiveurl.py (+12/-7) charmhelpers/payload/archive.py (+4/-3) tests/fetch/test_archiveurl.py (+17/-2) tests/payload/test_archive.py (+8/-3) |
To merge this branch: | bzr merge lp:~mew/charm-helpers/fetchallthethings |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Liam Young (community) | Approve | ||
Matthew Wedgwood (community) | Needs Resubmitting | ||
Review via email: mp+169552@code.launchpad.net |
Commit message
Extensible support for retrieving software from external sources. Includes support for tar.gz, tar.bz2, and zip archives via http, https, or ftp.
Description of the change
This branch adds a fetch system to charm-helpers, allowing authors to easily support retrieval of external code from a number of different sources. In turn, they can allow their users to decide which sources they trust and how external code is retrieved.
Only one source handler (for tar.gz, tar.bz2, and zip archives via http, https, or ftp) is implemented in this branch. The BaseFetchHandler class allows additional handlers to be implemented easily.
As a peripheral change, 'make lint' no longer checks for line lengths in code.
I had a few issues when giving this a test run:
1) s/os.path. environ. get/os. environ. get/ class(archive_ name) extract_ all(destpath) class.open( archive_ name) extractall( destpath) url_parts. path, dest_file) not extract(dest_file)
2) install_remote expects a directory to be passed back by handler.install but the extract* classes don't return that in the archive class
3) For a tar ball the open method needs to be called on the tar ball and the extract all method is named differently i.e. This works for zip but not tar:
archive = archive_
archive.
This works for tar but not zip:
archive = archive_
archive.
4) In the archive plugin the source archive needs to be passed when calling extract, i.e. it should be extract(