- 
118644b2
by Tom Pollard
at 2019-02-13T13:37:32Z
 Add cli main & user conf option for 'cache-buildtrees' context
_context.py: Add cache_buildtrees global user context, the default
of which is set to by default to 'always' via the addition of
cache-buildtrees to userconfig.yaml cache group. 'failure' & 'never'
can be given as valid options.
app.py & cli.py: Add --cache-buildtrees as a bst main option, which
when passed with a valid option can override the default or user
defined context for cache_buildtrees.
tests/completions/completions.py: Update for the added flag.
 
- 
b546bac1
by Tom Pollard
at 2019-02-13T13:37:32Z
 _frontend/cli.py: Ensure failed buildtree warning is correct
not _cached_sucess() could resolve to true if the element wasn't
cached at all. switch to _cached_failure() to ensure condition
reflects expected artifact state
 
- 
d2029444
by Tom Pollard
at 2019-02-13T13:37:32Z
 Provide configuration for the optional creation of buildtrees
Artifacts can be cached explicitly with an empty `build tree` when
built via the cli main options or user config for all or only
successful build artifacts. Default behaviour is to still create
and cache all expected buildtrees.
element.py: _cache_artifact() Check if context for cache_buildtrees
has been set to always or failure with a corresponding build
result, if not skip attempting to export the build-root. Element
types without a build-root are cached with an empty buildtree
regardless. Update _stage_sources_at() to warn the user that the
buildtree import is empty.
tests/integration: Add test to artifact.py for the optional caching
of buildtree content from bst build. Rename build-tree.py to
shellbuildtrees.py to reflect included test cases, add test for
empty buildtree warning and failure option.
NEWS: Add entry for new option.
 
- 
54ec032a
by Jürg Billeter
at 2019-02-13T14:50:15Z
 Merge branch 'tpollard/896' into 'master'
Optional creation of buildtrees
Closes #896
See merge request BuildStream/buildstream!1135 
- 
98091991
by Jürg Billeter
at 2019-02-13T14:54:59Z
 utils.py: Change _ensure_real_directory() to not resolve symlinks
Resolving symlinks during staging causes various issues:
* Split rules may not work properly as the resolved paths will differ
  depending on whether another artifact with a directory symlink has
  been staged in the same root directory or not, e.g., as part of
  compose.
* The order of symlinks in file lists is difficult to get right to
  guarantee consistent and predictable behavior as paths in a file list
  might rely on symlinks in the same file list. See #647 and #817.
* Staging order differences can lead to surprising results. See #390.
* Difficult to properly support absolute symlinks. Absolute symlinks are
  currently converted to relative symlinks, however, this doesn't always
  work. See #606 and #830.
This will require changes in projects that rely on the current behavior.
However, the changes are expected to be small and are often a sign of
buggy element files. E.g., elements that don't fully obey `bindir` or
`sbindir` variables.
 
- 
6d2573e9
by Jürg Billeter
at 2019-02-13T14:54:59Z
 _casbaseddirectory.py: Do not resolve symlinks
This matches the change in utils._process_list().
This also removes the _Resolver class as it is now unused. We may want
to support controlled symlink resolution in the future, in which case
the _Resolver class can be resurrected from this commit.
 
- 
38eae603
by Jürg Billeter
at 2019-02-13T14:54:59Z
 utils.py: Do not mangle absolute symlinks
Copy symlinks as they are, absolute or relative. We no longer resolve
symlinks when copying files, which makes this safe.
 
- 
b32c494d
by Jürg Billeter
at 2019-02-13T14:54:59Z
 Bump artifact version for changes in symlink handling
 
- 
5a32663b
by Jürg Billeter
at 2019-02-13T14:55:31Z
 NEWS: Add entry for change in symlink handling