summaryrefslogtreecommitdiff
path: root/buildstream/_frontend/main.py
Commit message (Collapse)AuthorAgeFilesLines
* Increase the soft limit for open file descriptorsjuerg/fuse-rlimitJürg Billeter2018-02-061-0/+9
| | | | | | | | SafeHardlinks FUSE needs to hold file descriptors for all processes in the sandbox. Avoid hitting the limit too quickly by increasing the soft limit to the maximum. Fixes #232
* Make workspaces element-wide instead of source-specificChandan Singh2018-02-051-15/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | At present, BuildStream supports source-specific workspaces. This patch makes workspaces element-wide. This will bring workspaces closer to what the build area looks like inside the sandbox when the build actually happens. As part of this change, format of `.bst/workspaces.yaml` file will also change. Previously, each element used to have a dict mapping each source to its workspace directory. Now, each element will directly map to its workspace directory. If users have existing workspaces open, this patch tries to cope with it but in some cases, it is not possible to reliably convert workspace config from old format to new format. When an element has workspace open for just one source, we assume that to be the workspace directory. But if there were more than one workspaces associated with an element, BuildStream will simply error out describing the issue. Note that the actual contents of the workspace directory are not changed in any case. So, if an element had multiple sources associated with it but only had workspace open for source, the other sources will not be automatically staged in the workspace unless the user runs `workspace reset` or something equivalent. Part of #209.
* _frontend: remove unused 'ctx' param from overrideAngelos Evripiotis2018-01-311-6/+3
| | | | | The 'ctx' parameter is carefully threaded through to 'complete_target', but it doesn't actually use it. Remove the parameter from unused places.
* _frontend: more doc on parametersAngelos Evripiotis2018-01-311-0/+13
|
* Get version number w/o pkg_resourcesGökçen Nurlu2018-01-311-4/+1
| | | | | | | | | | | | This removes most of the usages of pkg_resources from the codebase, helping the goal of getting rid of that completely. With this change, version number is generated during install and embedded into `__version__` which is then imported by root level `__init__`. From there, it is used by other parts of the codebase when needed. Generated `__version__` file is ignored and not tracked by git to prevent unnecessary 'changes' messages and accidental commits of that file.
* Add explicit error handling for ElementErrors that happen as a result of ↵Jonathan Maw2018-01-251-1/+4
| | | | staging artifacts
* Rename _force_inconsistent() to _schedule_tracking()Jürg Billeter2018-01-161-7/+7
| | | | | _force_inconsistent is too low level. Keep that detail contained in the Source class.
* _frontend/main.py: Fix `inconsistent` argumentJürg Billeter2018-01-161-2/+2
| | | | | Do not mark target element as inconsistent for `bst source-bundle` and `bst workspace open` if tracking is disabled.
* Update copyright years of files I have touchedSam Thursfield2018-01-111-1/+1
|
* Add `bst push --remote` and `bst pull --remote`Sam Thursfield2018-01-111-9/+25
| | | | | | | | This allows pushing and pulling from a specific cache, ignoring what is configured. If we choose to add a --remote option to `bst build` in future that would now be simple to do.
* _frontend/main.py: Making error handling more consistentrefactor-error-detailsTristan Van Berkom2018-01-111-16/+27
| | | | | | | | Added app.print_error() to consistently print an error while running the pipeline stuff. Also make bst push & pull commands more consistent with the rest, and print the summary at the end as expected.
* _frontend/main.py: Fix issue #180 - Fail gracefully when preflight failsTristan Van Berkom2018-01-061-21/+18
| | | | | | | This also makes main.py less redundant, for some reason there was a stray call to app.pipeline.initialize() beside app.initialize() in every function, instead move that into app.initialize() where we now handle the error and exit gracefully.
* _frontend: Enable logging right away, fixes issue #168Tristan Van Berkom2017-12-131-135/+44
| | | | | | | | | | | Now we just assume that logging is turned on all the time, any messages must now always go through the central context messaging APIs. As a side effect, we now send all output messages that buildstream generates to stderr, leaving stdout only to payload types of output, such as parsible `bst show` output, the output of `bst workspace list` or `bst shell`.
* _frontend/main.py: Rewording `--track-all` build optionTristan Van Berkom2017-12-131-2/+2
|
* main.py: Add `bst build --track-all`Tristan Maat2017-12-131-1/+6
|
* Add `bst build --track-except`Tristan Maat2017-12-131-3/+7
|
* Issue #117: Add `bst build --track`Tristan Maat2017-12-131-20/+29
|
* Issue #113: Split tracking and saving in `bst build`Tristan Maat2017-12-131-3/+8
|
* Remove unused importsGökçen Nurlu2017-12-071-1/+1
|
* _frontend/main.py: Adding --hardlinks option to `bst checkout`Tristan Van Berkom2017-12-051-2/+4
| | | | This fixes #162
* Only initialize remote artifact cache connections if neededSam Thursfield2017-11-231-6/+6
| | | | | | | | | | | | | | | | This fixes a regression from the canonical-pull-urls branch that was just merged. The `OSTreeCache.__init__()` function was connecting to the cache, which is bad because execution would randomly freeze for several seconds when the connection was slow. We now only initialize remote connections where needed; this was already introduced in 5c2ef6d076921bc0121e61efaa7a719c34ea1912 but had regressed. I renamed the keyword arg from `fetch_remote_refs` to `use_remote_cache` because it needs to be set for any interaction with the remote cache, doesn't matter if they are fetches or pushes. The initialization stage is also moved later so that we print a message telling the user what we are up to before trying the network access.
* Accept the first character as shortcut on interruption prompts130-interactive-prompt-prefixAntoine Wacheux2017-11-211-12/+40
| | | | | | | | On interruption, this makes buildstream to accept the first character of all the possible choices as if it was the full command. This behavior has been added to the failure screen and to the interruption screen. Fixes https://gitlab.com/BuildStream/buildstream/issues/130
* Removing unneeded str() statements in "{}".format() statementsTristan Van Berkom2017-11-211-4/+4
| | | | | Since these changes were effected in 3b17762a4cab23c238762ca32baa348788347473, these stringifications are now implied and no longer needed.
* Revert "Accept the first character as shortcut on interruption prompts"Tristan Van Berkom2017-11-191-40/+12
| | | | | | | This reverts commit d05f0f433979a6ae79667bb51d4a7a5f365941d6. Reverting this commit, seems to consistently break the cmake integration test when running on gitlab
* Accept the first character as shortcut on interruption promptsAntoine Wacheux2017-11-191-12/+40
| | | | | | | | On interruption, this makes buildstream to accept the first character of all the possible choices as if it was the full command. This behavior has been added to the failure screen and to the interruption screen. Fixes https://gitlab.com/BuildStream/buildstream/issues/130
* Load excepted elements as part of the pipelineTristan Maat2017-11-181-9/+12
| | | | | | | | Causes --except specified elements to be loaded separately and the intersections of the except elements and the loaded pipeline to be calculated. This fixes issue #131
* main.py: Fix app initializationTristan Maat2017-11-181-6/+6
|
* Switch old-style string formattings to new '.format()'Gökçen Nurlu2017-11-171-4/+4
|
* Refactor: Move context.py -> _context.pyTristan Van Berkom2017-11-081-1/+2
| | | | | | | | | | Consequently: o Changed Plugin.get_context() to a private Plugin._get_context() accessor. o Updated anything which imports Context to do so from private _context module o Updated docs to exclude the now private Context
* _frontend/main.py: Fix #133 - make completions work for --except argumentsTristan Van Berkom2017-11-081-1/+6
|
* refactoring: Made Project option privateTristan Van Berkom2017-11-061-1/+2
| | | | | | | | | | | | | | This required adding two new APIs to make up for it on the Source o get_project_directory() Added here because elements should not be accessing external resources, Sources needed for local files and GPG keys and such o translate_url() Used by sources to mish-mash the project aliases and create real urls.
* Refactoring: Renamed _BstError -> BstErrorTristan Van Berkom2017-11-061-14/+14
| | | | | | Base class for exceptions is now a part of the already private _exceptions module Also moved PipelineError from _pipeline -> _exceptions module
* Refactoring: Move exceptions module to be privateTristan Van Berkom2017-11-061-2/+2
| | | | Hide all of buildstream's internal exceptions from the API surface.
* _frontend/main.py: Removing arch related optionsTristan Van Berkom2017-11-061-17/+8
| | | | And adding --integrate/--no-integrate option to `bst checkout`
* main.py: Make CLI wording for elements consistentTristan Maat2017-11-041-29/+30
|
* Adjust commands to multiple targetsTristan Maat2017-11-041-30/+30
|
* _frontend/main.py: Hold on to unconditional startup messagesTristan Van Berkom2017-10-311-0/+8
| | | | | | | | | | | We avoid printing regular start/success/status messages etc at startup time in advance of the heading, this would introduce a lot of noise while interrogating source plugins for consistency state. This patch holds on to important errors and warnings which might be raised by core components at startup time, and prints them immediately after printing the heading.
* _pipeline.py: No except_ argument in source_bundleTristan Van Berkom2017-10-301-1/+1
| | | | | | | This is deadcode, except_ is already calculated before we get here. Updated some internal comments to reflect this, and updated the frontend to not pass the useless except_ parameter.
* _frontend/main.py: Fetch remote refs in a few placesTristan Van Berkom2017-10-291-6/+9
| | | | | | | | | | | | | | o bst build o bst push o bst pull o bst show --downloadable This adds a `--downloadable` option to `bst show`, if this is specified then buildstream will spend some time trying to download the remote artifact share's refs and refresh the local downloadable state. This fixes #140
* _frontend/main.py: Consistent exit code when exceptions occur.Tristan Van Berkom2017-10-231-5/+5
|
* _frontend/main.py: Added -o/--option main CLI paramsTristan Van Berkom2017-10-101-6/+16
| | | | | | Allows specifying option name/value tuples on the command line. Also updated frontend for minor API changes with Project & Context
* project.py: More consistent api for workspacesremove-variantsTristan Van Berkom2017-10-081-1/+1
| | | | | | | | Renamed _workspaces() -> _list_workspaces(), and changed local cache of workspaces from __workspaces -> _workspaces. We only really use the double underscore when there is a concern for freeing up namespace for public subclassing.
* _frontend/main.py: Removed all --variant CLI optionsTristan Van Berkom2017-10-081-54/+27
| | | | And construct the pipeline without any variant now.
* Simplify a bit of codeMathieu Bridon2017-09-191-5/+1
| | | | | There's no need to set a default value, then ignore a KeyError when we can directly use dict.get().
* _frontend/main.py: Changes to the bst shell commandTristan Van Berkom2017-09-101-22/+23
| | | | | | | | | | | | | | | | | | | | | | | bst shell command is now an optional argument, which defaults to ['sh', '-i']. This allows one to override the command including the shell, so one need not invoke the shell, thus it fixes issue #86. Instead of an option. This means we can pick up a complete command line after the '--' token directly from the remaining argument vector, which makes escaping of things a bit less complicated. E.g.: bst shell --scope run <target.bst> -- sh -c "echo Hello World" Further, the --scope argument is removed in favor of defaulting to the --scope=run behavior, and adding a --build option (use `bst shell --build <target>` for build shells, otherwise juse use `bst shell <target>` for run shells). Finally, the --builddir has been renamed to --sysroot; which a bit more accurately describes what it is.
* _frontend/main.py: special case test suite for completionsTristan Van Berkom2017-09-051-3/+16
| | | | | | | If we are executing completions in the context of running tests, dont use the fast exit path. Also some docstring fixups for push/pull commands
* _frontend/main.py: `bst workspace list` in machine readable format.Tristan Van Berkom2017-09-041-9/+14
| | | | | | | | | | It's important to be able to programatically interact with buildstream for things, that includes managing workspaces. This commit just dumps some serialized yaml instead of doing the pretty printing. This closes issue #55
* _frontend/main.py: Only prompt user when interactiveTristan Van Berkom2017-09-041-4/+7
| | | | | In both workspace_close() and workspace_reset() we do prompts, but these need to also be usable without human interaction.
* _frontend/main.py: Fix stack track when project has no element-pathTristan Van Berkom2017-09-011-1/+6
| | | | | | project.conf is not required to specify any element-path, and our shallow parse is not as smart as instantiating a Project() instance which we would rather avoid when doing completions.
* _frontend/main.py: Avoid loading messages when not in verboseTristan Van Berkom2017-09-011-0/+12
| | | | | | | | | This is currently a workaround for test cases where we need to parse the stdout but have no way to separate it from stderr. However, the default is currently verbose and I think it's not an issue to lose these loading messages without when passing --no-verbose.