summaryrefslogtreecommitdiff
path: root/buildstream/plugins
Commit message (Collapse)AuthorAgeFilesLines
* filter.py: Fail if declared domains do not exist in the parent elementjennis/warn_for_nonexistent_domainsJames Ennis2019-02-042-3/+29
| | | | | | | | | This patch also uncovered the fact that our test_filter_deps_ok() test has been inaccurate. Thus the element built in this test (deps-permitted.bst) has been modified so that it build depends on the input.bst element, as it should. tests/filter.py: Ensure deps_ok test passes
* filter.py: Add an example to the documentationjennis/filter-docsJames Ennis2019-02-011-3/+105
|
* filter.py/filter.yaml: Documentation improvementsJames Ennis2019-02-012-21/+22
|
* filter.py: don't recurse when staging dependenciesDor Askayo2019-01-301-1/+3
| | | | | | | Also bump the element's version so cached artifacts would be invalidated. Fixes #883
* Fixup refs to 'bst fetch'Angelos Evripiotis2019-01-281-2/+2
| | | | | Now that 'bst fetch' is obsolete, change guidance to refer to the replacement 'bst source fetch' instead.
* Fixup refs to 'bst track'Angelos Evripiotis2019-01-287-7/+7
| | | | | Now that 'bst track' is obsolete, change guidance to refer to the replacement 'bst source track' instead.
* Derive import plugin from Element instead of BuildElementChandan Singh2019-01-181-9/+2
| | | | | | | | | | | The `import` element is not really a build element. The main purpose of the `BuildElement` class is to allow users to run `build-commands`, `install-commands` etc. But, `import` does not run such commands. Moreover, we already override all the methods provided by `BuildElement`. So it only makes it confusing to have it derived from `BuildElement` class when it is not a build element. So, derive it from the base `Element` class instead.
* bzr source plugins: Remove all of the atomic backup directory business logicTristan Van Berkom2019-01-181-74/+18
| | | | | Follow up of last commit which uses exclusive locking to protect bzr operations instead.
* bzr source plugin: Use lock files to avoid corrupting the source cacheTristan Van Berkom2019-01-181-6/+29
| | | | This patch by itself fixes #868
* buildstream/plugins/elements/script.py: Mark script as BST_VIRTUAL_DIRECTORYvalentindavid/script_virtual_directoryValentin David2019-01-091-0/+3
| | | | | | | ScriptElement does not use Sandbox.get_directory. It works using it with remote execution. Fixes #850
* _downloadablefilesource.py: Avoid crashes when HOME is unsetTristan Van Berkom2018-12-261-1/+7
| | | | | | The python netrc module will raise OSError in the case that HOME is not set, this was discovered while running tests under tox.
* plugins/elements/import.py: Fixing new ↵Tristan Van Berkom2018-12-261-1/+1
| | | | (duplicate-string-formatting-argument) linter error
* Expose base class for Git source pluginsChandan Singh2018-12-201-644/+3
| | | | | | | | | | | | | | | | | | | Add a `_GitSourceBase` class to act as the base class for deriving source plugins that work with Git. The first user of this base class is the `git` source plugin that's in core at the moment. The contents of this base class is almost identical to the existing `GitSource` class. The two notable differences are: - the private methods now have leading underscores, as some were missing it originally - the name of the class Note that we are exposing a private member here as we expect it to move to a separate package soon. See the following discussion for more details: https://gitlab.com/BuildStream/buildstream/issues/739#note_124819869 Fixes #739.
* BuildElement: Don't enable batching of prepare and assemble by defaultTristan Van Berkom2018-12-1310-10/+70
| | | | | | | | | | Some external plugins depend derive from BuildElement and are broken by BuildElement enabling this batching by default. Instead, enable it in all of the individual build element plugin implementations. This fixes issue #800
* distutils plugin: Support virtual directoriesTristan Van Berkom2018-12-131-1/+2
|
* modulebuild plugin: Support virtual directoriesTristan Van Berkom2018-12-131-1/+2
|
* pip element plugin: Support virtual directoriesTristan Van Berkom2018-12-131-1/+2
|
* makemaker plugin: Support virtual directoriesTristan Van Berkom2018-12-131-1/+2
|
* manual plugin: Support virtual directoriesTristan Van Berkom2018-12-131-1/+2
|
* Force updating tags when fetching git repositoryvalentindavid/git_force_fetch_tagsValentin David2018-12-111-1/+1
| | | | | | | | | When using aliases there are multiple remotes used in the cache repository. When fetching, tags are not updated if the were previously fetched from a different remote. Commits that not in a branch and only tagged do not get fetched if the tag is not fetched. Fixes #812
* git source plugin: Emmit the ref-not-in-track warning from validate_cache()Tristan Van Berkom2018-12-061-37/+30
| | | | | | | | | | Now that we have Source.validate_cache(), this is a better place to emmit the ref-not-in-track warning, since it will be emmitted at the earliest opportunity and not only at Source.stage() or Source.init_workspace(). This also allows us to remove the `self.tracked` local state, and cleanup some convoluted calling paths, removing some unnecessary parameters from the usual codepaths and making the plugin overall more readable.
* git source plugin: Implementing submodule warningsTristan Van Berkom2018-12-061-12/+75
| | | | | | | | | | | | | | | | | o Unlisted submodule warning Now the git plugin will issue a configurable warning if a submodule exists and is used (checking out the submodule is not disabled), but is not specified in the source configuration. o Invalid submodule warning Now the git source plugin will issue a warning if the configuration specified a submodule which does not exist in the underlying git repository. As a side effect, this patch also changes the flow control of the git plugin such that submodules which are explicitly set to not be checked out, are also not fetched but instead ignored completely.
* git source plugin: Rename symbol for consistency and readabilityTristan Van Berkom2018-12-061-2/+3
| | | | | Change 'INCONSISTENT_SUBMODULE' for 'WARN_INCONSISTENT_SUBMODULE' to make things a bit more readable and comprehensive.
* git source plugin: Fixing documentation linking and typoTristan Van Berkom2018-12-061-5/+6
| | | | | | | | | | Fixes the configurable warning part of this to properly link to the project.conf documentation describing what configurable warnings actually are. Also fix the plugin raise the actual configurable warning which it advertizes that it raises; which is 'inconsistent-submodule', not 'inconsistent-submodules'.
* types.py: Moving CoreWarnings to the types.py moduleTristan Van Berkom2018-12-061-2/+1
| | | | | | This also ensures it is exposed via the main buildstream __init__.py file, fixes the imports of CoreWarnings, and adjusts the documentation links to point to the right place.
* git source plugin: Track git tags and save them to reproduce a minimum ↵Valentin David2018-12-051-13/+203
| | | | | | | | | | | | | | | shallow repository Instead of tag information being fetched which can change with time, they are tracked and saved in the projects.refs/.bst. Then we re-tag automatically the closest tag so that `git describe` works and is reproducible. This new feature is opt-in with the new `track-tags` configuration, and must be used to fix modules which are broken by our new policy of omitting the `.git/` repository when staging git sources. This fixes issue #487
* buildstream/plugins/sources/git.py: warn about checkout by defaultJavier Jardón2018-12-031-0/+5
| | | | See #783
* Add support for .netrc in remote/tar/zip pluginsValentin David2018-11-291-1/+79
| | | | Fixes #723.
* compose.py: Support batching for integration commandsJürg Billeter2018-11-271-2/+3
|
* local.py: Implement _get_local_path()Jürg Billeter2018-11-271-0/+3
|
* plugins/elements/cmake.yaml: always specify variable typesAbderrahim Kitouni2018-11-191-1/+1
| | | | | | | cmake sometimes misinterprets relative paths as relative to the current directory if this is not specified. See freedesktop-sdk/freedesktop-sdk#431 adjust tests/format/variables.py accordingly.
* sources/pip.py: Use move_atomic instead of manual os.renameBenjamin Schubert2018-11-191-7/+7
| | | | | This uses move_atomic insteand of the manual os.rename and manual error checking and throws a SourceError for consistency with other modules.
* Extract atomic move function to utils.pyBenjamin Schubert2018-11-191-19/+11
| | | | | | | | Moving atomically a file/directory can be tricky since different errors might be raised for the same underlying problem. Having a utility function to reduce this discrepancies will help in ensuring we have correct behavior
* Fix os.rename in git source element to correctly handle error codesBenjamin Schubert2018-11-191-15/+18
| | | | | | | | | | | | | According to the documentation (https://www.unix.com/man-page/POSIX/3posix/rename/), when the directory already is there, either EEXIST or ENOTEMPTY could be thrown. Previously only ENOTEMPTY was checked. Done: - Separated the move into its own function - Check for both errors - Create unit tests for it, covering most test cases
* plugins/sources/pip.py: also look for python version named "python"Benjamin Schubert2018-11-191-0/+1
| | | | | | | | In some virtual environments, we might not have the binary with the exact python version, which would lead the current pip plugin to fail to find a working pip version. This adds "python" at the start of the list of valid python versions
* plugins/sources/pip.py: Accomodate characters '-','.','_' for packagesctolentino82018-11-021-4/+19
|
* BREAK: manual.yaml: don't set any default env varsAngelos Evripiotis2018-11-011-19/+0
| | | | | | | | | | | | | | | | Remove the 'MAKEFLAGS' and 'V' defaults. Now that there is a specialised 'make' element, these make-specific defaults don't make sense here. This element is meant to be a blank slate for folks to build on. Note that this is a breaking change, that will require some users to make changes to their .bst files if they are expecting these environment variable to be set. _versions.py: BST_FORMAT_VERSION bumped to 18. This fixes issue #718
* build elements: Add reference to BuildElement's built-in configchandan/source-doc-directoryChandan Singh2018-10-2511-0/+33
| | | | | | | | | | | For each element plugin derived from BuildElement, add reference to the built-in functionality documentation of BuildElement. * buildelement.py: Add anchor for built-in functionality. * plugins/elements/*.py: Add refence to BuildElement's built-in functionality for each build element. Related to #713.
* sources: Don't redundantly document directory configurationChandan Singh2018-10-2510-34/+26
| | | | | | | | | | | | 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/source/git.py: Rationalised unused return valuesDaniel Silverstone2018-10-251-2/+2
| | | | | | | The `assert_ref_in_track()` method's return value was never used so rationalise it to never return a value. Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
* _downloadablefilesource: handle ValueError-sAngelos Evripiotis2018-10-251-1/+3
|
* plugins/sources: refactor, rm needless ExitStack-sAngelos Evripiotis2018-10-232-6/+4
| | | | | Remove two uses of ExitStack that aren't necessary and make the code a little harder to follow.
* Spelling fixes: 'affect', not 'effect' as verbAngelos Evripiotis2018-10-197-7/+7
| | | | | Fix most instances of 'effect' being used as a verb instead of a noun. Skipped generated instance in doc/source/conf.py.
* Fix python warnings: Use collections.abc instead collectionsjjardon/warnings_collectionsJavier Jardón2018-10-182-2/+2
| | | | | | | | Since python 3.3, collections has been moved to collections.abc module. For backwards compatibility, they continue to be visible in this module through Python 3.7. Subsequently, they will be removed entirely. See https://docs.python.org/3/library/collections.html
* Fix spelling of it's and itsRichard Dale2018-10-165-6/+6
|
* Add conf-root variable to buildsWilliam Salmon2018-10-166-12/+13
| | | | | | | Adding the conf-root variable makes creating out of source builds slightly easier. For issue #512 in Gitlab.
* git.py: Added timed activity around fetching, displaying the URL being fetched.Tristan Van Berkom2018-10-031-4/+12
| | | | This will take care of silencing the status messages while checking submodules.
* git.py: Make `ref` human readableJürg Billeter2018-09-271-2/+24
| | | | Use `git describe` to prefix `ref` with closest tag, if available.
* Upstream libtool .la file removalThomas Coldrick2018-09-081-0/+36
| | | | | | In freedesktop-sdk we add a script to our project.conf to remove libtool .la files from autotools projects after install, this seems like a sensible default, so we're attempting to send it upstream.
* qmake.py: Mark this as a BST_VIRTUAL_DIRECTORY‧pluginMartin Blanchard2018-09-071-1/+2
| | | | https://gitlab.com/BuildStream/buildstream/issues/454