summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* plugin tests: Adding new tests with plugins loaded in a pipelineformat-versionTristan Van Berkom2017-08-3017-0/+178
| | | | | | | | o Testing that we can load a custom element or source o Testing that we assert and trigger an error when the requested format version of a plugin by the project is greater than the reported version of the plugin
* project tests: Added test ensuring that we assert project versions.Tristan Van Berkom2017-08-302-0/+15
|
* plugin.py: Added BST_FORMAT_VERSION class attribute to pluginsTristan Van Berkom2017-08-301-3/+33
| | | | | | | | Plugins can now advertize their respective format version with this class attribute. At instantiation time, the plugin will take care of asserting that the project's versioning requirements are met.
* project.py: Load new definitions of project version requirementsTristan Van Berkom2017-08-302-0/+59
| | | | | | | | | o Define the base buildstream format as BST_FORMAT_VERSION in the project module o Load and cache any required versions of plugins o Assert overall project version is supported at load time
* exceptions.py: Added LoadErrorReason.UNSUPPORTED_PROJECTTristan Van Berkom2017-08-301-0/+3
|
* element.py and plugins: Changed Element.strict_rebuild APITristan Van Berkom2017-08-303-4/+12
| | | | | | Instead use BST_STRICT_REBUILD and follow a new pattern we're using for any class attributes used for the plugin to communicate static data back to the core.
* element.py: Changing artifact version APITristan Van Berkom2017-08-301-29/+18
| | | | | | | | | | | Starting to go with using class attributes in some cases for the plugin to communicate static things like required version and strict rebuild policies. This is interesting because class attributes suggest that you cannot return something dynamic, and at the same time class attributes are useful at times when you have a plugin type but no instance.
* plugin tests: Added tests for new version assertionsTristan Van Berkom2017-08-305-0/+44
|
* _plugincontext.py: Added some new assertionsTristan Van Berkom2017-08-301-21/+43
| | | | | | | | | | | | | | | | Added assertions: o Bail out with a PluginError instead of an ImportError in the case that PluginSource.load_plugin() fails to import the plugin. o Assert that the running buildstream version is new enough for any loaded plugin, otherwise bail out with a PluginError. Also changed all string formatting here to be consistent with the rest of buildstream and use "{}".format("foo") instead of "%s" % "foo".
* plugin.py: Added BST_REQUIRED_VERSION_MAJOR and BST_REQUIRED_VERSION_MINORTristan Van Berkom2017-08-301-0/+7
| | | | | Element and Source plugins can set this as class data to indicate the minimal BuildStream API they depend on.
* utils.py: Added get_bst_version() APITristan Van Berkom2017-08-301-0/+15
| | | | Fetches the numeric major/minor version of the BuildStream package.
* plugins tests: Fixed to expect errors at plugin load timeTristan Van Berkom2017-08-291-24/+32
| | | | | Errors which were previously detected when loading the plugin context are now only detected when loading the plugin.
* _plugincontext.py: Load plugins on demandTristan Van Berkom2017-08-291-13/+13
| | | | This fixes issue #79
* compose.py plugin: Expose a new `exclude` option.compose-excludeTristan Van Berkom2017-08-292-19/+38
| | | | | | | | Using the new enhanced Element API for staging, allow the user to specify domains to exclude as well as domains to include. Fixes issue #78
* element.py: Changed artifact staging apis to have an 'exclude' argumentTristan Van Berkom2017-08-291-15/+38
| | | | | | | | | Instead of just being able to specify what domains to include and whether to include orphans, also specify what domains to exclude. This allows one to deal with situations with overlapping rules more dynamically; i.e. one can include all of `/usr/bin/*` and then specifically exclude `/usr/bin/gcc` by itself.
* plugin.py: Added detail parameter to Plugin.timed_activity()Tristan Van Berkom2017-08-291-2/+3
| | | | | | | | Allows for more information in timed activities, consequently avoiding the need for additional status messages in some cases. The message detail component is only shown at activity START time but omitted at FAILURE/SUCCESS time.
* _frontend: Fixed yesterdays build breakage.Tristan Van Berkom2017-08-282-96/+115
| | | | | | | | | | | The click completions code was written based on my branch of click master, which I had been running locally. Yesterday it worked but only against master, this patch adds some extra customizations so that we can handle specific arguments (like bst file targets) specially, and now it works with stable releases of click, which means buildstream is no longer broken also.
* doc/source/completion.rst: Added some docs on setting up bash completionsTristan Van Berkom2017-08-282-0/+17
|
* buildstream/data/bst: Adding a bash completion scriptlet.Tristan Van Berkom2017-08-282-1/+38
| | | | | Currently this gets installed at ${prefix}/share/bash-completion/completions but this is not exactly correct.
* main.py: Override clicks entry point and do our completions.Tristan Van Berkom2017-08-281-14/+58
| | | | | | Just override clicks main entry point at just the right time to step in and do our completions before it gets a chance.
* complete.py: Enhanced to complete bst filesTristan Van Berkom2017-08-281-24/+72
| | | | | Now we complete bst files in the project's element directory when completions are available.
* _frontend/complete.py: Added new custom bash completions modulesTristan Van Berkom2017-08-281-0/+308
| | | | | | | | | This is based on my branch of the click library where I was unable to land a patch for this. We should use an upstream solution once this issue is solved: https://github.com/pallets/click/issues/780
* import.py: Implement generate_script() for source bundlesJürg Billeter2017-08-221-0/+26
| | | | Fixes #59
* artifactcache.py: Fix escaping of element namesTristan Van Berkom2017-08-211-1/+6
| | | | Fixes issue #66
* main.py: Add -c / --command option to `bst shell`shell-commandJürg Billeter2017-08-171-2/+5
| | | | Fixes #65
* element.py: Add optional command argument to _shell()Jürg Billeter2017-08-171-5/+12
| | | | If specified, the command will run in non-interactive mode.
* _frontend/main.py: Use click.INT type for bst workspace --sourceThomas Chetwin2017-08-161-3/+3
| | | | | | | | | | | | `bst workspace {open,close,reset} <bst> --source <index>` commands currently give an indexing error. The python click library needs to be told that the expected argument is of type integer. This patch also makes use of metavar to display a placeholder in the help prompt, like: -s, --source INDEX The source to create a workspace for. Projects with one source may omit this
* workspace open: --no-checkout doesn't need --forceAngelos Evripiotis2017-08-151-1/+1
| | | | | | | | | | Remove the requirement to specify '--force' in conjunction with '--no-checkout' if there are already files in the workspace. We won't write anything when opening the workspace, so there's nothing to force. For example, when opening a workspace to an existing clone of a repository, it seems alarming to have to '--force' the workspace open. It made me wonder if it will actually be overwritten.
* main.py: Print status message when fetching artifact listJürg Billeter2017-08-151-0/+4
| | | | Fixes #60
* _pipeline.py: Add remote_ticker for artifact list fetchingJürg Billeter2017-08-151-0/+3
|
* Add '-h' as alias for '--help' on all commandsAngelos Evripiotis2017-08-111-1/+1
|
* Add a pip elementMathieu Bridon2017-08-103-0/+66
| | | | | | | | | | | | | | | | | | | Packaging is a big topic in the Python community these days. Things are evolving, but a consensus seems to have formed around the path forward. With PEP 518, Pip is becoming the primary tool to install Python modules. In turn, Pip will use the right underlying tool for the job. (distutils, setuptools, flint, ...) Given all this, it makes sense to have a pip element in BuildStream. This element installs a single Python module, telling Pip not to go and download its dependencies, to make builds reproducible and not rely on the network during builds. By default it will use the `pip` command which generally points to Pip for Python 2. Users can override the "pip" variable, for example to use the `pip3` command, which generally points to Pip for Python 3.
* makemaker.py: Fix typo in commentMathieu Bridon2017-08-101-1/+1
| | | | This seems to be a simple copy-paste mistake.
* main.py: Include all dependencies in source bundleJürg Billeter2017-08-101-14/+3
| | | | | | | | To build all elements, the source bundle has to include the sources and scripts for all elements, not just build dependencies and their runtime dependencies. This removes the --deps option as it doesn't make sense in this context.
* main.py: Fix crash with `bst workspace list` in bad directoryJürg Billeter2017-08-101-3/+7
| | | | Fixes #57
* _pipeline.py: Fix --deps runJürg Billeter2017-08-101-1/+1
|
* setup.py: Catch exception with OSTree < 2017.4Jürg Billeter2017-08-101-5/+8
| | | | Fixes #58
* tests/loader: Test dependency type 'all'Jürg Billeter2017-08-102-0/+22
|
* _loader.py: Support dependency type 'all'Jürg Billeter2017-08-101-2/+3
| | | | | | This is equivalent to not specifying a dependency type at all. Fixes #61
* Add `bst pull` commandJürg Billeter2017-08-082-0/+69
|
* Add initial `bst push` commandSam Thursfield2017-08-082-0/+69
| | | | | | | This is mainly useful for testing artifact caches and such. Most users will hopefully be able to make use of artifact caches populated by automated build machines, but right now it's unlikely that most people will be pushing artifacts around.
* element.py: Allow calling _skip_push() for uncached elementsJürg Billeter2017-08-081-1/+2
| | | | This is required when using a push queue without build queue.
* Update Dockerfile to fc26 as it has a fixed ostree.Justin Erenkrantz2017-08-032-26/+3
|
* _artifactcache: Fix pull in non-strict modeJürg Billeter2017-08-021-3/+3
| | | | Strong ref was not created.
* frontend: Implement interactive 'retry' optionTristan Van Berkom2017-08-013-11/+17
| | | | Not useful for builds, but interesting for network related tasks.
* setup.py: Hard require OSTree >= 2017.8Tristan Van Berkom2017-08-011-15/+13
|
* widget.py: Added 'downloadable' element status.Tristan Van Berkom2017-08-011-0/+2
|
* element.py: Fix broken exception for non-strict rebuilds of certain elements ↵Tristan Van Berkom2017-07-311-1/+1
| | | | | | | (strict_rebuild) This was doing a non-recursive calculation of weak cache keys, but the intention was to do a recursive one; this is why my demo was an epic failure.
* scriptelement.py plugin: Mark for strict_rebuildTristan Van Berkom2017-07-291-0/+2
|
* compose.py plugin: Mark for strict_rebuildTristan Van Berkom2017-07-291-0/+2
|