| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
This is to update the workspace CLI to as agreed on the mailing list
https://mail.gnome.org/archives/buildstream-list/2018-September/msg00046.html
This patch also introduces the default workspace directory.
|
| |
|
|
|
|
| |
This is to be coherent with the rest of the codebase
|
|
|
|
|
|
| |
This patch ensures that we receive an appropriate error
message if we specify an absolute path that leads within
the project.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Provide options in project.conf to disable the 'Are you sure ...'
prompts when making destructive changes:
- Add prompt.really-workspace-close-remove-dir
- Add prompt.really-workspace-reset-hard
Add a NEWS item for these.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Provide an option in buildstream.conf to disable the 'Would you like to
...' prompt when we cannot resolve a project.
Some users prefer not to be interrupted by such prompts, so pave the way
to creating options to disable all those that might get in the way.
Follow the example of the advice.* options 'git-config', and create a
namespace for these UI options grouped by behaviour, rather than an
over-reaching 'ui.*' namespace. In later work perhaps we'll also add
'advice.*' options.
Add a NEWS item for this.
|
|
|
|
|
|
|
|
|
| |
Use a new helper function to simplify working with nodes that can only
accept certain strings. This will be used when adding the prompt.*
config options.
In later work we can see if this function would be useful elsewhere, and
could be added to '_yaml.py'.
|
|
|
|
|
|
|
|
|
| |
Enable this option of 'terminate', which is mentioned in userconfig.yaml
and handled in _frontend/app.py:_handle_failure(). It appears to have
been left out of the valid_actions as an oversight.
Originally introduced in
https://gitlab.com/BuildStream/buildstream/commit/2622d5da9bd9fefd87436613d6e3e9770fdd0f28
|
| |
|
|
|
|
|
|
| |
The default values are in userconfig.yaml, together with the
documentation. The default values should not be duplicated in
_context.py.
|
|
|
|
|
| |
The Context was only used to obtain a reference to the CASCache
and set the unused cas_directory field.
|
|
|
|
|
|
| |
Reverse the way we were handling caching by only caching
when we know it's a problem with the build or the build is a
success in order not to cache transient errors.
|
|
|
|
|
|
|
|
|
|
| |
Sandbox errors (like missing host tools) are dependent on the host
system and rarely on what is actually done.
It is therefore better to not cache them as they are subject to
change between two runs.
Also add test to ensure sandbox failure are not cached
|
|
|
|
|
|
|
| |
cmake sometimes misinterprets relative paths as relative to the current directory
if this is not specified. See freedesktop-sdk/freedesktop-sdk#431
adjust tests/format/variables.py accordingly.
|
|
|
|
|
|
|
|
|
|
|
|
| |
As discussed in
https://mail.gnome.org/archives/buildstream-list/2018-September/msg00064.html,
add `bst source-checkout` command. This will allow users to checkout
sources for a given target.
* _frontend/cli.py: Add source-checkout command
* _pipeline.py: Add assert_sources_cached() method
* _stream.py: Add source_checkout method, abstract out
__check_location_writable() method that used to part of checkout()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, `Pipeline.assert_consistent()` prints an error message like
the one below when certain elements have inconsistent sources:
```
...
Element: hello.bst is inconsistent
Source tar source at hello.bst [line 16 column 2] is missing ref
...
```
Drop the word "Source" from the beginning of the message as
"Source <source-kind> source ..." is kind of awkward to read.
|
|
|
|
|
| |
This uses move_atomic insteand of the manual os.rename and manual error
checking and throws a SourceError for consistency with other modules.
|
| |
|
|
|
|
|
|
|
|
| |
Moving atomically a file/directory can be tricky since different
errors might be raised for the same underlying problem.
Having a utility function to reduce this discrepancies will help
in ensuring we have correct behavior
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to the documentation
(https://www.unix.com/man-page/POSIX/3posix/rename/), when the directory
already is there, either EEXIST or ENOTEMPTY could be thrown.
Previously only ENOTEMPTY was checked.
Done:
- Separated the move into its own function
- Check for both errors
- Create unit tests for it, covering most test cases
|
|
|
|
|
|
|
|
| |
In some virtual environments, we might not have the binary with the
exact python version, which would lead the current pip plugin to
fail to find a working pip version.
This adds "python" at the start of the list of valid python versions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The addition of cached build trees being included in element
artifacts has led to mostly redundant download overheads when
pulling from a remote artifact server. As such the default behaviour
of pull shouldn't fetch the build tree object if available.
element.py: extend relevant pull logic for specified subdir
consideration and ensure push logic does not lead to partial
artifact pushes. Change assumption that the buildtree can be
extracted if artifact is cached. __cached_buildtree() and
__pull_directories() helpers added.
_artifactcache/: artifactcache.py & cascache.py inclusion of
helper functions for subdir artifact checking & fetching, fetch
logic extended to only pull required artifact directories.
extract & checkout updated to handle full/partial operation.
tests/: addition of integration test pullbuildtrees.py,
buildtrees.py adapted cli options, testutils/artifactshare.py
has_artifact changed to return artifact digest on true condition.
|
|
|
|
|
|
|
|
|
|
|
|
| |
_context.py: Add pull_buildtrees global user context, the default
of which is set to False via the addition of pull-buildtrees to
userconfig.yaml cache group.
_frontend/app.py & cli.py: Add --pull-buildtrees as a bst main
option, which when passed will override the default or user defined
context for pull_buildtrees.
tests/completions/completions.py: Update for the added flag.
|
|
|
|
|
|
|
|
|
|
|
| |
command failure
If `bwrap` fails to set up the sandbox and start the payload command
it won't write an exit-code in --json-status-fd,
so we can report if it was a sandboxing failure if we don't get exit-code status
and a payload command failure if we do and it's non-zero.
Closes https://gitlab.com/BuildStream/buildstream/issues/286
|
|
|
|
|
| |
It's inconvenient to have to create a Linux platform to parse the bwrap version
and we want to get the version in a consistent manner.
|
|
|
|
|
|
| |
_project.py: Added validate_nodes() helper function to prevent duplicate lists
element-path was being used before node validation resulting in uncaught errors
|
|
|
|
|
|
| |
As per PEP 0479 (https://www.python.org/dev/peps/pep-0479/),
StopIteration thrown in context managers are not valid starting from
Python 3.7.
|
|
|
|
| |
This will now return paths in the same order as list_relative_paths.
|
|
|
|
| |
Fixes issue #574.
|
|
|
|
|
|
|
|
|
| |
Previously, debug messages from `Plugin.__del__()` went to stdout
which was a problem for the test suite in extremely rare and hard to
predict circumstances. This corrects that by sending the message to
stderr where all the rest of the messages tend to go.
Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
|
|
|
|
|
| |
Due to the changed Exception message, this patch also changes
the test_parse_size_over_1024T test in misc.py
|
|
|
|
| |
The issue was introduced by 6ccfab0b1b25990e406446d5cbe5aee83a5e158a.
|
|
|
|
|
| |
This adds a `reason` to the SandboxEror thrown in sandboxdummy
to be able to understand where the error comes from
|
|
|
|
|
|
|
|
| |
Remove the bwraps checks from _site.py and put them in platform.linux
which is the only place where they are run.
This allows the removal of a double level of caching, making
reasoning about tests easier
|
|
|
|
| |
Fixes #645.
|
|
|
|
|
|
|
|
| |
Root directory was marked as a non-artifact mount, so not using
SafeHardLink. However integration commands executed with write access
to the root directory.
Fixes #749
|
|
|
|
|
| |
There are arguments for and against using onerror - see issue #735
for details.
|
|
|
|
|
| |
Replaces the custom one which was erroneously added during development.
Fixes #746.
|
| |
|
|
|
|
|
|
|
|
| |
This changes CASCache from a subclass to a delegate object of
ArtifactCache. As the lower layer, CASCache no longer deals with
elements or projects.
Fixes #659.
|
|
|
|
|
|
|
| |
The artifact cache backend does not affect build outputs and we anyway
no longer have pluggable artifact cache backends. This hardcodes
CASCache instead of removing the entry completely to avoid cache key
changes.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Get the artifact cache from the context instead.
|
|
|
|
| |
Fixes: 825963b5 ("element: Make "--sysroot" take a bare directory")
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the core Python `ChainMap.get()` implements with:
self[key] if key in self else default
The double-chain-lookup is expensive. This simple change solves that
for our ChainMap derived structure. As such it improves matters
for #466 somewhat.
Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
|