summaryrefslogtreecommitdiff
path: root/buildstream/plugins/sources/tar.py
Commit message (Collapse)AuthorAgeFilesLines
* Fixup refs to 'bst track'Angelos Evripiotis2019-01-281-1/+1
| | | | | Now that 'bst track' is obsolete, change guidance to refer to the replacement 'bst source track' instead.
* sources: Don't redundantly document directory configurationChandan Singh2018-10-251-3/+3
| | | | | | | | | | | | Instead of redundantly documenting "directory" configuration option in each source plugin, refer to the built-in functionality documentation of the Source class. * source.py: Add anchor for built-in functionality. * sources/plugins/*.py: Remove directory config option, and add reference to Source's built-in functionality. Fixes #713.
* plugins/sources: refactor, rm needless ExitStack-sAngelos Evripiotis2018-10-231-3/+2
| | | | | Remove two uses of ExitStack that aren't necessary and make the code a little harder to follow.
* Fix E741 warningsjjardon/pycodestyle_fixesJavier Jardón2018-08-281-3/+3
|
* Source plugin tar depends on host's lzipJavier Jardón2018-06-221-0/+4
| | | | Issue #353
* Remove shebangs from python filesGökçen Nurlu2018-06-191-1/+0
| | | | Fixes #424
* doc: Added plugins as ToC elements instead of orphaned linksTristan Van Berkom2018-06-091-1/+4
| | | | | | | | | | | | o Now the page titles are declared in plugins, allowing for a more descriptive ToC o Makefile and plugin.rsttemplate updated to not produce the title, to no longer use `:orphan:` for plugin pages, and to ignore any private modules in the plugin directories. o Interestingly, now the docs will fail to build if you add a new plugin and forget to add it to the documentation.
* plugins: Disable attribute-defined-outside-init pylint errorTristan Van Berkom2018-04-201-0/+1
| | | | | Plugins set their attributes in configure(), because the constructor is not public API.
* pylint - dealt with superfluous-parens warningJames Ennis2018-03-141-1/+1
|
* doc: consistent source staging dir docAngelos Evripiotis2018-02-131-0/+3
| | | | | All source plugins respond to the 'directory' key, so add the doc for it to those that didn't have it.
* plugins/sources/tar.py: Dont manually reraise exceptionTristan Van Berkom2017-12-201-5/+4
| | | | | It's not required to raise SourceError() manually when calling utils.get_host_tool().
* Remove unused importsGökçen Nurlu2017-12-071-1/+1
|
* Add support for lzip in tar source. Fix #158.Valentin David2017-11-301-1/+32
|
* Fix untar of symlinks. Only hardlinks are relative to top of archive and ↵Valentin David2017-11-291-3/+1
| | | | should be normalized.
* plugins/sources/tar.py: Consider link names in extractionTristan Van Berkom2017-11-171-0/+13
| | | | | | | | When extracting files from a base directory, we are normalizing the TarInfo file names so we need to also normalize the link names in the case of links and symlinks. Fixes issue #155
* plugins/sources/tar.py: Ignore leading ./ in tarball pathsTristan Van Berkom2017-11-031-9/+18
| | | | | | | This makes buildstream behave the same way with tarballs which were encoded with a leading `.` and those encoded without one. This fixes issue #145
* tar: Move most of the code to a new base classMathieu Bridon2017-11-031-91/+7
| | | | | | | | | | | The new DownloadableFileSource will be used as a base for all sources which just download a file to use as source. The existing TarSource just keeps the code responsible to manage a Tar archive. This will help implemeting other types of single file downloaded sources, for example Zip archives.
* plugins/sources/tar.py: Ignore possible leading '.' directory.Tristan Van Berkom2017-11-021-0/+6
| | | | | | | | | | | | | | | To extract the full tarball, one should set base-dir to an empty string. By ignoring the leading '.' in any archive, we make the 'base-dir' API more predictable and reliable - the default behavior of '*' is to pickup the first directory in the tarball (usually source code tarballs are encoded with one leading directory) - in the off chance that a source tarball has a leading '.' in it; that would cause the 'base-dir' default '*' glob to extract the whole thing. It seems undesirable to behave differently depending on whether a tarball was encoded with, or without a leading '.'
* Add source plugin node validationsTristan Maat2017-09-141-0/+2
|
* tar.py source plugin: Use utils.sha256sum()Tristan Van Berkom2017-09-121-9/+1
|
* tar.py: Use the utils.glob() methodTristan Van Berkom2017-06-291-20/+2
| | | | | We moved the code originally here into utils.py, now use the code in utils.py.
* tar.py: Consider the 'base-dir' as part of the unique keySam Thursfield2017-06-151-1/+1
| | | | | | | | The 'base-dir' setting affects how the resulting artifact is produced. BuildElements will probably not build at all if the 'base-dir' is incorrect. However, an ImportElement importing a tar source will just import the wrong contents if 'base-dir' is wrong, which only affects the builds *after* the import.
* tar.py plugin: Handle urllib.error.ContentTooShortErrorTristan Van Berkom2017-05-281-1/+1
| | | | | This is not documented to be a subclass of urllib.error.URLError so it should be handled separately.
* tar.py source plugin: Handle globbing of tarfiles lacking directory entriesTristan Van Berkom2017-05-211-6/+34
| | | | | | | | | Not all tarballs contain entries for leading path components of files which exist in the archive, but we need the globbing checks to return matches for directory components regardless. This patch adds some logic to traverse the tarball paths with added directory components where the tarball is missing them.
* tar.py source plugin: Implement base-dir glob pattern parameterTristan Van Berkom2017-05-141-2/+63
| | | | | | | | This is to address issue 25 by allowing some flexibility of what directory should be extracted from the source tarball, it will default to '*' which will match the first directory found at the root of the tarball, which will work for the vast majority of standard source code release tarballs.
* tar.py source plugin: Reducing line length in documentationTristan Van Berkom2017-04-131-3/+3
| | | | | So that it's readable without the horizontal scrollbar (which remains, but only for the example sha256sum that is there)
* tar.py source: Some minor changes before mergeTristan Van Berkom2017-04-131-9/+5
| | | | | | o Removed the unused `self.tracking` variable o Added some context to raised SourceErrors
* Add a tar source pluginJonathan Maw2017-04-131-0/+160
This is for pulling tar files from URLs and staging them by unpacking them into the staging area.