It looks like ArchiveUrlFetchHandler is incorrectly reporting that is can't handle uncompressed tar files:
$ ls /tmp/testfetch/pay* /tmp/testfetch/payload2.tar.gz /tmp/testfetch/payload.tar $ python Python 2.7.4 (default, Apr 19 2013, 18:32:33) [GCC 4.7.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import charmhelpers.fetch.archiveurl >>> fh = charmhelpers.fetch.archiveurl.ArchiveUrlFetchHandler() >>> fh.can_handle('file:///tmp/testfetch/payload.tar') False >>> fh.can_handle('file:///tmp/testfetch/payload2.tar.gz') True >>> quit()
Also, I think ArchiveUrlFetchHandlerTest should test a file uri that doesn't contain a hostname i.e. of the format file:///path/to/tarfile
« Back to merge proposal
It looks like ArchiveUrlFetch Handler is incorrectly reporting that is can't handle uncompressed tar files:
$ ls /tmp/testfetch/pay* payload2. tar.gz /tmp/testfetch/ payload. tar fetch.archiveur l fetch.archiveur l.ArchiveUrlFet chHandler( ) handle( 'file:/ //tmp/testfetch /payload. tar') handle( 'file:/ //tmp/testfetch /payload2. tar.gz' )
/tmp/testfetch/
$ python
Python 2.7.4 (default, Apr 19 2013, 18:32:33)
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import charmhelpers.
>>> fh = charmhelpers.
>>> fh.can_
False
>>> fh.can_
True
>>> quit()
Also, I think ArchiveUrlFetch HandlerTest should test a file uri that doesn't contain a hostname i.e. of the format file:// /path/to/ tarfile