-
b1d2f001
by Tristan Van Berkom
at 2018-12-06T14:18:31Z
source.py: Add new delegate method validate_cache()
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.
-
ee7fc47f
by Tristan Van Berkom
at 2018-12-06T14:18:31Z
git source plugin: Implementing submodule warnings
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.
-
5fc9a1da
by Tristan Van Berkom
at 2018-12-06T14:18:31Z
git source plugin: Emmit the ref-not-in-track warning from validate_cache()
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.
-
50cb2706
by Tristan Van Berkom
at 2018-12-06T14:18:31Z
tests/testutils/repo/git.py: Adding remove_path() helper
A function for removing paths from a git repo, can also
be used to remove submodules.
-
f139ca8f
by Tristan Van Berkom
at 2018-12-06T14:18:31Z
tests/sources/git.py: Testing the git:unlisted-submodule warning
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)
-
afe1aa9f
by Tristan Van Berkom
at 2018-12-06T14:18:31Z
tests/sources/git.py: Testing the git:invalid-submodule warning
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)
-
57300201
by Tristan Van Berkom
at 2018-12-06T14:18:31Z
tests/sources/git.py: Test unlisted submodules warning appearing after track
-
a0297625
by Tristan Van Berkom
at 2018-12-06T14:18:31Z
tests/sources/git.py: Test invalid submodules warning appearing after track
-
60e96781
by Tristan Van Berkom
at 2018-12-06T15:14:37Z
Merge branch 'tristan/submodule-warnings' into 'master'
Implement submodule warnings
See merge request BuildStream/buildstream!996
-
7fe55143
by Jonathan Maw
at 2018-12-06T15:48:12Z
Fix bst source-checkout not working with open workspaces
-
2a6879a5
by Jonathan Maw
at 2018-12-06T17:46:33Z
Merge branch 'jonathan/source-checkout-workspace' into 'master'
Fix bst source-checkout not working with open workspaces
Closes #807
See merge request BuildStream/buildstream!997
-
e61e6e50
by Tristan Van Berkom
at 2018-12-07T07:57:13Z
_yaml.py: Added `allow_none` parameter to _yaml.node_get()
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()
-
504ecb3e
by Tristan Van Berkom
at 2018-12-07T07:57:56Z
plugin.py: Added new `allow_none` parameter to Plugin.node_get_member(), 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.
-
642ae4e8
by Tristan Van Berkom
at 2018-12-07T07:57:56Z
tests/format/project.py: Added new regression test for empty dependency dictionaries
This adds a regression test for issue #803
-
2a0676c3
by Tristan Van Berkom
at 2018-12-07T08:33:14Z
Merge branch 'tristan/yaml-optionally-allow-none' into 'master'
Only optionally allow None values in user provided YAML
Closes #803
See merge request BuildStream/buildstream!999
-
56c2c2cc
by Javier Jardón
at 2018-12-09T16:59:26Z
buildstream/data/projectconfig.yaml: Remove default strip-binaries
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
-
dcb6b5e8
by Javier Jardón
at 2018-12-09T16:59:26Z
NEWS: Update for removal of default strip-commands
-
ae0afce5
by Javier Jardón
at 2018-12-09T17:08:16Z
buildstream/buildelement.py: Document where to find strip commands for Linux
-
873b618c
by Javier Jardón
at 2018-12-10T09:49:52Z
Merge branch 'jjardon/strip-binaries-removal' into 'master'
Remove default strip-commands
Closes #645
See merge request BuildStream/buildstream!987
-
f2fcc2f6
by Valentin David
at 2018-12-11T12:12:08Z
Force updating tags when fetching git repository
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
-
717c10d1
by Valentin David
at 2018-12-11T12:44:56Z
Merge branch 'valentindavid/git_force_fetch_tags' into 'master'
Force updating tags when fetching git repository
Closes #812
See merge request BuildStream/buildstream!1000
-
7892287a
by Jonathan Maw
at 2018-12-11T12:56:32Z
utils.py: Add a helper for searching upwards for files
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
-
67c7a58d
by Jonathan Maw
at 2018-12-11T12:56:32Z
Create and store data inside projects when opening workspaces
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
-
64836b18
by Jonathan Maw
at 2018-12-11T12:56:32Z
_project.py: Rename _ensure_project_dir to _find_project_dir
This is a part of #222
-
7deeb2c3
by Jonathan Maw
at 2018-12-11T12:56:32Z
cli.py: Use utils' search upwards helper when searching for project.conf
This is a part of #222
-
496f0ab7
by Jonathan Maw
at 2018-12-11T12:56:32Z
_project.py: Find project from workspace if outside of a project
This is a part of #222
-
921f2bcb
by Jonathan Maw
at 2018-12-11T12:56:32Z
_workspaces.py: Do not include .bstproject.yaml in the cache key
This is a part of #222
-
f145a3e4
by Jonathan Maw
at 2018-12-11T12:56:32Z
cli: Interactively warn if the user is trying to close the workspace they're 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
-
494cb7c6
by Jonathan Maw
at 2018-12-11T14:12:54Z
tests: Test bst commands from an external workspace
This is a part of #222
-
fd1c5c5a
by Jonathan Maw
at 2018-12-11T14:12:54Z
NEWS: Add an entry for being able to run commands from a workspace
This is a part of #222
-
4219a6b4
by Jonathan Maw
at 2018-12-11T16:00:55Z
Merge branch 'jonathan/workspace-fragment-create' into 'master'
Support invoking buildstream from a workspace outside a project
See merge request BuildStream/buildstream!924
-
36601376
by Phillip Smyth
at 2018-12-12T13:29:29Z
_frontend/cli.py: Added show all functionality
_frontend/cli.py: Added helper function for walking through dirs to return files
data/projectconfig.yaml: Added new variable for `default: target-element`
_project.py: Added config variable to node_validate
-
a0b9b78e
by Phillip Smyth
at 2018-12-12T13:29:29Z
tests/frontend/show.py: bst show default element
Added supporting folders
-
aba8c9f9
by Phillip Smyth
at 2018-12-12T13:29:58Z
Updated NEWS to reflect changes to bst show