summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* NEWS: Add entry about the removal of source-bundle commandphil/source-checkout-optionsPhil Dawson2018-12-121-0/+6
|
* Remove source bundle commandPhil Dawson2018-12-126-169/+0
| | | | This is part of the work towards #672
* Add option to source-checkout command to generate build scriptsPhil Dawson2018-12-123-9/+57
|
* Add --force / -f option to source-checkout commandPhil Dawson2018-12-123-6/+28
|
* Add --tar option to source-checkout commandPhil Dawson2018-12-123-8/+89
| | | | This commit is part of the work towards #672
* Merge branch 'jonathan/workspace-fragment-guess-element' into 'master'Jonathan Maw2018-12-1211-43/+231
|\ | | | | | | | | Guess the element when running commands in a workspace See merge request BuildStream/buildstream!954
| * doc: Point out that element is optional when commands are run from the workspacejonathan/workspace-fragment-guess-elementJonathan Maw2018-12-113-1/+57
| | | | | | | | This is a part of #222
| * Add NEWS for guessing the element in commandsJonathan Maw2018-12-111-0/+5
| | | | | | | | This is a part of #222
| * tests: Add tests for guessing element namesJonathan Maw2018-12-113-25/+61
| | | | | | | | This is a part of #222
| * Make specifying elements optional in bst commandsJonathan Maw2018-12-112-14/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Known issues: * `bst shell` works, but `bst shell COMMANDS...` doesn't, because click has no way of separating optional args from variable-length args. * `bst checkout` and `bst source-checkout`'s usage strings mark LOCATION as an optional argument. Because click gets confused if there's an optional argument before a mandatory argument, I had to mark LOCATION as optional internally. * `bst workspace open` makes no sense with element being optional, so I skipped it. * `bst workspace close` will probably need to be revisited when multiple projects can own one workspace. * `bst workspace reset` will happily delete the directory you're currently in, requiring you to `cd $PWD` to see the contents of your directory. I could exclude the top-level directory of the workspace being deleted, but it is entirely valid to run workspace commands from deeper in the workspace. This is a part of #222
| * _context.py: Store the directory buildstream was invoked onJonathan Maw2018-12-112-2/+6
| |
| * _stream.py: Fix ugly error when opening a workspace using a relative pathJonathan Maw2018-12-111-1/+2
|/
* Merge branch 'jonathan/workspace-fragment-create' into 'master'Jonathan Maw2018-12-1111-56/+555
|\ | | | | | | | | Support invoking buildstream from a workspace outside a project See merge request BuildStream/buildstream!924
| * NEWS: Add an entry for being able to run commands from a workspacejonathan/workspace-fragment-createJonathan Maw2018-12-111-0/+4
| | | | | | | | This is a part of #222
| * tests: Test bst commands from an external workspaceJonathan Maw2018-12-113-5/+188
| | | | | | | | This is a part of #222
| * cli: Interactively warn if the user is trying to close the workspace they're ↵Jonathan Maw2018-12-114-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | using to load the project This involves changes in: * _stream.py: * Add the helper Stream.workspace_is_required() * userconfig.yaml: * Add a default value for prompt.really-workspace-close-project-inaccessible * _context.py: * Load the prompt 'really-workspace-close-project-inaccessible' from user config. * cli.py: * If buildstream is invoked interactively, prompt the user to confirm that they want to close the workspace they're using to load this project. This is a part of #222
| * _workspaces.py: Do not include .bstproject.yaml in the cache keyJonathan Maw2018-12-111-1/+6
| | | | | | | | This is a part of #222
| * _project.py: Find project from workspace if outside of a projectJonathan Maw2018-12-111-13/+35
| | | | | | | | This is a part of #222
| * cli.py: Use utils' search upwards helper when searching for project.confJonathan Maw2018-12-111-11/+2
| | | | | | | | This is a part of #222
| * _project.py: Rename _ensure_project_dir to _find_project_dirJonathan Maw2018-12-111-3/+3
| | | | | | | | This is a part of #222
| * Create and store data inside projects when opening workspacesJonathan Maw2018-12-113-23/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes to _context.py: * Context has been extended to contain a WorkspaceProjectCache, as there are times when we want to use it before a Workspaces can be initialised (looking up a WorkspaceProject to find the directory that the project is in) Changes to _stream.py: * Removed staging the elements from workspace_open() and workspace_reset() Changes in _workspaces.py: * A new WorkspaceProject contains all the information needed to refer back to a project from its workspace (currently this is the project path and the element used to create this workspace) * This is stored within a new WorkspaceProjectCache object, which keeps WorkspaceProjects around so they don't need to be loaded from disk repeatedly. * Workspaces has been extended to contain the WorkspaceProjectCache, and will use it when opening and closing workspaces. * Workspaces.create_workspace has been extended to handle the staging of the element into the workspace, in addition to creating the equivalent WorkspaceProject file. This is a part of #222
| * utils.py: Add a helper for searching upwards for filesJonathan Maw2018-12-111-0/+31
|/ | | | | | | | i.e. with a given directory and filename, check parent directories until either a directory with the filename is found, or you reach the root of the filesystem. This is a part of #222
* Merge branch 'valentindavid/git_force_fetch_tags' into 'master'Valentin David2018-12-113-2/+103
|\ | | | | | | | | | | | | Force updating tags when fetching git repository Closes #812 See merge request BuildStream/buildstream!1000
| * Force updating tags when fetching git repositoryvalentindavid/git_force_fetch_tagsValentin David2018-12-113-2/+103
|/ | | | | | | | | 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
* Merge branch 'jjardon/strip-binaries-removal' into 'master'Javier Jardón2018-12-1012-80/+38
|\ | | | | | | | | | | | | Remove default strip-commands Closes #645 See merge request BuildStream/buildstream!987
| * buildstream/buildelement.py: Document where to find strip commands for Linuxjjardon/strip-binaries-removalJavier Jardón2018-12-091-0/+8
| |
| * NEWS: Update for removal of default strip-commandsJavier Jardón2018-12-091-0/+4
| |
| * buildstream/data/projectconfig.yaml: Remove default strip-binariesJavier Jardón2018-12-0910-80/+26
|/ | | | | | | | | They are too specific to be included by default Recommendation is if you are building in Linux is to use the ones begin used in the freedesktop-sdk project, for example See #645
* Merge branch 'tristan/yaml-optionally-allow-none' into 'master'Tristan Van Berkom2018-12-075-5/+18
|\ | | | | | | | | | | | | Only optionally allow None values in user provided YAML Closes #803 See merge request BuildStream/buildstream!999
| * tests/format/project.py: Added new regression test for empty dependency ↵Tristan Van Berkom2018-12-073-0/+11
| | | | | | | | | | | | dictionaries This adds a regression test for issue #803
| * plugin.py: Added new `allow_none` parameter to Plugin.node_get_member(), ↵Tristan Van Berkom2018-12-071-2/+3
| | | | | | | | | | | | | | | | | | defaulting to False. Allow plugins to conveniently leverage the new `allow_none` parameter, and have Plugin.node_get_member() raise a LoadError in the usual case where None is not an acceptable value to be explicitly set in the user provided YAML.
| * _yaml.py: Added `allow_none` parameter to _yaml.node_get()Tristan Van Berkom2018-12-071-3/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | This allows specifying whether or not the code believes a None value is acceptable if explicitly expressed to be None in the YAML. A previous patch 3ba544b80f9f268be8ffe62fc8589b30212ec4a2 changed the behavior to accept None for all values across the board, along with allowing explicitly setting the `default_value` to `None` which caused the code to be much more readable (this was the main motivation of the patch, but it had the side effect of allowing None for everything). In the majority of cases we load YAML however, it either has a value or it is not specified in the YAML, and None is hardly ever acceptable to be explicitly specified (it may be in the case you want to override something with nothing in the YAML, but it is the edge case). This had the side effect of causing unexpected crashes where the YAML specifies an empty dictionary for instance. Instead of forcing the caller to handle a possible None value, give the choice to the caller if they really want to accept a None value, and raise the LoadError otherwise. This fixes issue #803, which is a crash due to receival of an unexpected None value through _yaml.node_get()
* Merge branch 'jonathan/source-checkout-workspace' into 'master'Jonathan Maw2018-12-062-2/+9
|\ | | | | | | | | | | | | Fix bst source-checkout not working with open workspaces Closes #807 See merge request BuildStream/buildstream!997
| * Fix bst source-checkout not working with open workspacesJonathan Maw2018-12-062-2/+9
|/
* Merge branch 'tristan/submodule-warnings' into 'master'Tristan Van Berkom2018-12-065-51/+404
|\ | | | | | | | | Implement submodule warnings See merge request BuildStream/buildstream!996
| * tests/sources/git.py: Test invalid submodules warning appearing after trackTristan Van Berkom2018-12-061-0/+61
| |
| * tests/sources/git.py: Test unlisted submodules warning appearing after trackTristan Van Berkom2018-12-061-0/+63
| |
| * tests/sources/git.py: Testing the git:invalid-submodule warningTristan Van Berkom2018-12-061-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Test that it is not triggered in show before fetch, because we don't know the submodules yet so we cannot know if they are valid or not. o Test that it is triggered by a fetch command o Test that it is triggered by `show` after having completed a fetch command, since now we have the repository and know which specified submodules are invalid o Test all of this under warning or error conditions (parameterized for fatal-warnings)
| * tests/sources/git.py: Testing the git:unlisted-submodule warningTristan Van Berkom2018-12-061-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | o Test that it is not triggered in show before fetch, because we don't know about the unlisted submodules yet o Test that it is triggered by a fetch command o Test that it is triggered by `show` after having completed a fetch command, since now we have the repository and know about the unlisted submodule o Test all of this under warning or error conditions (parameterized for fatal-warnings)
| * tests/testutils/repo/git.py: Adding remove_path() helperTristan Van Berkom2018-12-061-0/+6
| | | | | | | | | | A function for removing paths from a git repo, can also be used to remove submodules.
| * 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-062-13/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * source.py: Add new delegate method validate_cache()Tristan Van Berkom2018-12-061-1/+24
|/ | | | | | | This is guaranteed to be called only once for a given session once the sources are known to be Consistency.CACHED, if source tracking is enabled in the session for this source, then this will only be called if the sources become cached after tracking completes.
* Merge branch 'tristan/misc-cleanup' into 'master'Tristan Van Berkom2018-12-0610-97/+77
|\ | | | | | | | | Misc cleanups See merge request BuildStream/buildstream!993
| * 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'.
| * Source: Fix typo in documentation, and make it a link to `bst track`Tristan Van Berkom2018-12-061-1/+2
| | | | | | | | | | | | | | Now the commands have documentation linkability so we can link to them when referring to them anywhere in the docs. This reference was previously referring to a bogus non-existent `build-stream track`, maybe this dates way back to the days before we named the frontend `bst`.
| * types.py: Moving CoreWarnings to the types.py moduleTristan Van Berkom2018-12-068-49/+50
| | | | | | | | | | | | 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.
| * tests/sources/git.py: Refactor ref-not-in-track test to use parameterizationTristan Van Berkom2018-12-061-41/+17
|/ | | | | Instead of duplicating the whole test body, run it twice while checking for a warning or an error depending on the parameter.
* Merge branch 'raoul/628-RE-flow-optimisation' into 'master'Raoul Hidalgo Charman2018-12-054-74/+152
|\ | | | | | | | | | | | | Remote-execution client flow optimisation Closes #628 See merge request BuildStream/buildstream!982