summaryrefslogtreecommitdiff
path: root/buildstream/_frontend/main.py
Commit message (Collapse)AuthorAgeFilesLines
* pylint - dealt with import warningsJames Ennis2018-03-141-2/+4
|
* pylint - dealt with len-as-condition warningJames Ennis2018-03-141-1/+1
|
* pylint - dealt with bad-continuation warningJames Ennis2018-03-141-2/+1
|
* Enhanced bst shell configuration and cli optionsTristan Van Berkom2018-03-041-2/+2
| | | | | | | | | | | | | | | | | | | Some changes to the host-files configuration: o Dont require `host-files` to not be directories We need to specify directories to mount from `project.conf` after all. o Added possibility of specifying optional mounts, to avoid meaningless warnings where optional files don't exist on the host Added --mount CLI option to `bst shell` This allows users to explicitly mount whatever they want into the sandbox environment for `bst shell`. This closes issue #274
* Add logfile format tokeniserJim MacArthur2018-03-011-1/+2
| | | | | | widget.py: Main body of tokenizer. _context.py: Read message-format from user config YAML. main.py: Pass in context message-format to LogLine constructor.
* _frontend: Added App.shell() to call instead of directly invoking the ↵Tristan Van Berkom2018-02-241-1/+18
| | | | | | | | Element._shell() And use this place to format a custom prompt for PS1, here we have click and we use the ANSI colors in PS1 only if colors are enabled.
* bst shell: Added --isolate option, disabled by default.tristan/isolate-shellTristan Van Berkom2018-02-231-1/+1
| | | | | | | | | | | | | | | | | | This changes a few things: o How the shell environment and sandbox modes are setup is not decided by whether a `--build` sandbox was staged or not o In interactive build debugging mode, an isolated build sandbox is used o The bst shell command now has the option to control it o All invocations of bst shell now use a read-only rootfs, avoiding FUSE layer and file descriptor limits (this can be made optional later if needed) This is a part of issue #223
* Refactor CLI importscompletion-optimizationsTristan Maat2018-02-081-687/+2
| | | | | This reduces the number of unconditional imports, mainly to speed up bash completion.
* Add junction support for subprojectsJürg Billeter2018-02-081-7/+15
| | | | | This introduces junctions as a new kind of elements to allow dependencies to cross project boundaries.
* Move cli_options from Context to ProjectJürg Billeter2018-02-081-4/+4
| | | | cli_options are project-specific.
* 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
|