- 
09ef8b25
by Jonathan Maw
at 2018-10-30T15:42:05Z
 element.py: Always clean up the rootdir
We shouldn't need it to persist now that we cache failed build dirs.
This change breaks the test
`tests/integration/shell.py::test_sysroot_workspace_visible`.
I can no longer see a use-case for this test.
AIUI, it tested that the failed build sysroot stored in the builddir has
the workspace's files in, despite the workspace being unmounted.
I believe this behaviour is made redundant by cached buildtrees.
This fixes part of #539
 
- 
37afde0a
by Jonathan Maw
at 2018-10-30T15:42:05Z
 Element: Use cached buildtree in build shells and failure shells
This includes changes in app.py:
* Interactive failure shell no longer uses the failed build sysroot,
  defaulting to the cached build tree.
Changes in element.py are:
* Errors caused by building don't store the failed build sysroot,
  instead storing that a sandbox can be created to debug the error.
* When staging sources, will stage the element's cached build tree if it
  exists.
Changes in _exceptions.py:
* BstError.sandbox is now a flag of whether a sandbox can be opened up
  to debug the error.
Changes in widget.py:
* Don't try to print any information about the sandbox.
Changes in _message.py:
* Fix documentation so Message.sandbox is not a directory any more.
This is part of #539
 
- 
4bc71773
by Jonathan Maw
at 2018-10-30T15:42:05Z
 NEWS: Add item for cached buildtree behaviour
 
- 
9b89564f
by Jonathan Maw
at 2018-10-30T15:42:05Z
 tests: Add test that cached build trees are staged in build shells
This is related to #539
 
- 
ec76cbe1
by Jonathan Maw
at 2018-10-30T15:42:05Z
 sandbox.py: Remove redundant Sandbox.__directory
 
- 
825963b5
by Jonathan Maw
at 2018-10-30T15:42:05Z
 element: Make "--sysroot" take a bare directory
i.e. instead of taking a directory that must contain "root" and
"scratch", and treating "root" as the root, use the directory directly.
In element.py:
* __sandbox takes the `bare_sandbox` arg, to pass into the sandbox's constructor
In sandbox.py:
* If bare_sandbox, `_root` is the passed-in directory, and `__scratch`
  is None.
* Trying to use `__scratch` when bare_sandbox is True is a bug.
In _mount.py:
* Don't get the value of `__scratch` if it's not needed.
This is part of #539
 
- 
cf721838
by Jonathan Maw
at 2018-10-30T15:42:05Z
 NEWS: Add item for bst shell --sysroot changes
 
- 
79d1bb7f
by Jonathan Maw
at 2018-10-30T15:42:05Z
 tests: Add tests for 'bst shell --sysroot'
This is related to #539
 
- 
c7ac7e7d
by Jonathan Maw
at 2018-10-30T16:19:17Z
 Merge branch 'jonathan/debug-remote-failed-builds' into 'master'
Jonathan/debug remote failed builds
See merge request BuildStream/buildstream!869 
- 
516e990e
by ctolentino8
at 2018-10-31T11:36:46Z
 _frontend/app.py: Set correct element-path in interactive bst-init
 
- 
b8a37a63
by Tristan Van Berkom
at 2018-11-01T10:16:25Z
 Merge branch 'chiaratolentino/bst-init-interactive-elementpath' into 'master'
_frontend/app.py: Set correct element-path in interactive bst-init
See merge request BuildStream/buildstream!912 
- 
b27b592a
by Benjamin Schubert
at 2018-11-01T10:49:57Z
 Remove dependency on pytest-runner
This includes a new command mimicking pytest-runner so that we
can drop this dependency
This was the only setup_requires dependency that we had and
will make like easier for people behind proxies
 
- 
89ace5d7
by Benjamin Schubert
at 2018-11-01T11:16:36Z
 Merge branch 'bschubert/remove-pytest-runner' into 'master'
Remove dependency on pytest-runner
See merge request BuildStream/buildstream!886 
- 
4cfabce8
by Angelos Evripiotis
at 2018-11-01T11:35:02Z
 BREAK: manual.yaml: don't set any default env vars
Remove the 'MAKEFLAGS' and 'V' defaults.
Now that there is a specialised 'make' element, these make-specific
defaults don't make sense here. This element is meant to be a blank
slate for folks to build on.
Note that this is a breaking change, that will require some users to
make changes to their .bst files if they are expecting these environment
variable to be set.
_versions.py: BST_FORMAT_VERSION bumped to 18.
This fixes issue #718
 
- 
48860aac
by Tristan Van Berkom
at 2018-11-01T12:01:04Z
 Merge branch 'tristan/empty-manual-element' into 'master'
BREAK: manual.yaml: don't set any default env vars
Closes #718
See merge request BuildStream/buildstream!916 
- 
d868b409
by Daniel Silverstone
at 2018-11-01T13:40:24Z
 _yaml.py: Implement `get()` for `ChainMap`
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>
- 
7f79b9ce
by Tristan Van Berkom
at 2018-11-01T14:25:57Z
 Merge branch 'danielsilverstone-ct/improve-chainmap-get' into 'master'
_yaml.py: Implement `get()` for `ChainMap`
See merge request BuildStream/buildstream!919 
- 
de59ebdb
by ctolentino8
at 2018-11-02T16:41:54Z
 plugins/sources/pip.py: Accomodate characters '-','.','_' for packages
 
- 
8d7cf806
by ctolentino8
at 2018-11-02T16:41:54Z
 tests/integration/project/files: Remove pypi-repo
 
- 
9c2f9bf7
by Chandan Singh
at 2018-11-02T17:09:46Z
 Merge branch 'chiaratolentino/fix-pip-source-regex' into 'master'
plugins/sources/pip.py: Accomodate characters '-','.','_' for packages
See merge request BuildStream/buildstream!914 
- 
3788e701
by Jürg Billeter
at 2018-11-03T11:52:00Z
 element.py: Pass bare_directory also to SandboxRemote()
Fixes: 825963b5 ("element: Make "--sysroot" take a bare directory")
- 
82e971ef
by Jürg Billeter
at 2018-11-05T11:33:20Z
 Merge branch 'juerg/remote-execution' into 'master'
element.py: Pass bare_directory also to SandboxRemote()
See merge request BuildStream/buildstream!928 
- 
62942bfd
by Valentin David
at 2018-11-05T12:14:20Z
 Use less fetchers in overnight build to work-around limitations from servers.
Issue happens with sourceware.org server.
Fixes #742
 
- 
442da2f9
by Javier Jardón
at 2018-11-05T12:41:54Z
 Merge branch 'valentindavid/limit_fetchers_in_overnight_build' into 'master'
Use less fetchers in overnight build to work-around limitations from servers.
Closes #742
See merge request BuildStream/buildstream!929 
- 
0993de53
by Richard Maw
at 2018-11-05T16:41:05Z
 dev-requirements: Update pytest dependency to 3.8
"_frontend/app.py: Set correct element-path in interactive bst-init"
added a dependency on the tmp_path test fixture, which was added by 3.8.
 
- 
be8f0a54
by richardmaw-codethink
at 2018-11-05T17:08:43Z
 Merge branch 'richardmaw/pytest-dep-update' into 'master'
dev-requirements: Update pytest dependency to 3.8
See merge request BuildStream/buildstream!930 
- 
bfb639bf
by Jürg Billeter
at 2018-11-05T17:18:12Z
 element.py: Remove artifacts parameter from constructor
Get the artifact cache from the context instead.
 
- 
ca855f91
by Jürg Billeter
at 2018-11-05T17:18:12Z
 _elementfactory.py: Remove unused artifacts parameter from create()
 
- 
15fed21c
by Jürg Billeter
at 2018-11-05T17:18:12Z
 _project.py: Remove unused artifacts parameter from create_element()
 
- 
0085d2aa
by Jürg Billeter
at 2018-11-05T17:18:12Z
 element.py: Remove unused artifacts parameter from _new_from_meta()
 
- 
f69b1117
by Jürg Billeter
at 2018-11-05T17:18:12Z
 _project.py: Remove unused artifacts parameter from load_elements()
 
- 
e398f877
by Jürg Billeter
at 2018-11-05T17:18:12Z
 element.py: Do not include type name of artifact cache in cache key
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.
 
- 
626d20ae
by Jürg Billeter
at 2018-11-05T17:18:12Z
 Split up artifact cache and CAS cache
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.
 
- 
ec04446b
by Jürg Billeter
at 2018-11-05T17:51:39Z
 Merge branch 'juerg/cas' into 'master'
Split up artifact cache and CAS cache
Closes #659
See merge request BuildStream/buildstream!922 
- 
9a045080
by Josh Smith
at 2018-11-06T13:23:19Z
 utils: Fix _pretty_size() for sizes > 1024T
 
- 
d3a07e6b
by Josh Smith
at 2018-11-06T13:23:19Z
 Add regression test for _pretty_size
 
- 
0c09fb9c
by richardmaw-codethink
at 2018-11-06T14:12:20Z
 Merge branch 'Qinusty/unit-test-utils' into 'master'
Fix issue with _pretty_size with large numbers of bytes
See merge request BuildStream/buildstream!799 
- 
b4eec489
by Jim MacArthur
at 2018-11-06T16:44:14Z
 _sandboxremote.py: Use the standard SandboxError.
Replaces the custom one which was erroneously added during development.
Fixes #746.
 
- 
1f7acf74
by Jim MacArthur
at 2018-11-06T17:16:31Z
 Merge branch 'jmac/remote-sandbox-errors' into 'master'
_sandboxremote.py: Use the standard SandboxError
Closes #746
See merge request BuildStream/buildstream!931 
- 
8e64ccef
by James Ennis
at 2018-11-07T11:06:11Z
 using_config.rst: Update our instructions for how we declare caches in user config
 
- 
09ab676d
by James Ennis
at 2018-11-07T11:06:11Z
 format_project.rst: Update instructions regarding how we declare remote caches in project.conf
 
- 
f514124f
by James Ennis
at 2018-11-07T11:06:11Z
 using_configuring_artifact_server.rst: Remove examples and redirect to user config/project config
 
- 
029ba17d
by richardmaw-codethink
at 2018-11-07T11:32:20Z
 Merge branch 'jennis/docs_patch' into 'master'
Update our instructions/examples regarding how we declare remote caches
See merge request BuildStream/buildstream!932 
- 
261e2cd3
by Jim MacArthur
at 2018-11-07T12:02:43Z
 element.py: Use _force_rmtree instead of custom code.
There are arguments for and against using onerror - see issue #735
for details.
 
- 
8931e42c
by Jim MacArthur
at 2018-11-07T12:26:06Z
 Merge branch 'jmac/make_writable_combination' into 'master'
Use _force_rmtree instead of custom code.
Closes #735
See merge request BuildStream/buildstream!927 
- 
6ccfab0b
by Valentin David
at 2018-11-07T16:28:47Z
 Fix cache corruption by scripts when layout and integration commands are used
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
 
- 
f24e20e9
by richardmaw-codethink
at 2018-11-07T16:59:50Z
 Merge branch 'valentindavid/script-artifact-corruption' into 'master'
Fix cache corruption by scripts when layout and integration commands are used
Closes #749
See merge request BuildStream/buildstream!934 
- 
afae4b09
by Richard Maw
at 2018-11-07T17:00:50Z
 manual.py: Add BST_VIRTUAL_DIRECTORY flag
 
- 
1729ac32
by Richard Maw
at 2018-11-07T17:00:50Z
 element: Add BST_GRANULAR_STAGE Element flag
This commit introduces BST_GRANULAR_STAGE as a compatibility flag,
so Elements can assert that calling stage_dependency_artifacts,
integrate_dependencies and post_integration_staging
is equivalent to calling stage.
This will be needed to implement staging multiple elements,
since the integration commands for all elements need to be called
after all dependencies are staged.
 
- 
6eff4307
by Richard Maw
at 2018-11-07T17:00:50Z
 element: use BST_GRANULAR_STAGE in prepare_sandbox and assemble
This makes it prefer to call stage_dependency_artifacts,
integrate_dependencies and post_integration_staging in-turn
if BST_GRANULAR_STAGE is set,
so the implementation of Element.stage may be omitted.
The prepare_sandbox implementation looks a little convoluted
because for Scope.BUILD and self.BST_GRANULAR_STAGE
we prefer to run the granular methods,
but we also run most of them for Scope.RUN
except the extra parts of stage() that were post-integration.
 
- 
1328fbce
by Richard Maw
at 2018-11-07T17:00:50Z
 scriptelement: Split stage into granular methods
This makes the __layout check per-method
and makes ScriptElement.stage call the methods in turn.
stage_dependency_artifacts falls-back to the default implementation
for everything except Scope.BUILD since Element.stage was only called
for Scope.BUILD, so layout handling shouldn't be consulted for other scopes
for compatibility with existing behaviour.
 
- 
a903ebd0
by Richard Maw
at 2018-11-07T17:00:50Z
 elements: Port build and script kinds to BST_GRANULAR_STAGE
This is mostly just marking which elements work as expected
from changes to their base class.
Junction and Filter elements expect overriding stage to be sufficient
to prevent it doing anything in those contexts,
and since Element.stage is going to be hanging around
there's no pressing need to port everything.
 
- 
6fe706f3
by Richard Maw
at 2018-11-07T17:00:50Z
 _stream: Move shell logic from Element and support multiple elements
There's redundancy in pre-staging sandbox creation logic
with Element._sandbox doing something similar,
but hopefully not too much.
 
- 
8fcada9e
by Richard Maw
at 2018-11-07T17:00:50Z
 element: Remove dead _shell method
 
- 
b0a46509
by Richard Maw
at 2018-11-07T17:00:50Z
 cli: Support multiple elements with -e option
 
- 
7e3c1ce0
by Richard Maw
at 2018-11-07T17:00:50Z
 tests: Move integration.bst to subdirectory
 
- 
5e5ee6e0
by Richard Maw
at 2018-11-07T17:00:50Z
 tests: Test multiple-element runtime and workspace shells
 
- 
39e23ecf
by Richard Maw
at 2018-11-07T17:00:50Z
 Add to NEWS