summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* requirements/dev-requirements.txt: New version requirementstristan/unpin-coverageTristan Van Berkom2019-02-181-9/+11
| | | | Committing the results of `make -C requirements`.
* requirements/dev-requirements.in: Unpin coverageTristan Van Berkom2019-02-181-1/+1
| | | | | | | To play better with distros, we should try to keep our loose requirements minimal bound. This should fix #916
* Merge branch 'jjardon/distros' into 'master'Javier Jardón2019-02-151-0/+6
|\ | | | | | | | | README.rst: Add table with distros with packaged buildstream See merge request BuildStream/buildstream!1143
| * README.rst: Add table with distros with packaged buildstreamjjardon/distrosJavier Jardón2019-02-151-0/+6
|/ | | | [ci skip]
* Merge branch 'chandan/bst-here-tags' into 'master'Chandan Singh2019-02-151-3/+17
|\ | | | | | | | | contrib/bst-here: Allow users to specify image variant See merge request BuildStream/buildstream!1153
| * contrib/bst-here: Allow users to specify image variantChandan Singh2019-02-151-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the `buildstream/buildstream` image has 9 variants, let's make it easier to choose the desired tag, using a command-line option. This is otherwise possible by specifying the full image name `image:tag` using the `-i` option. But, this will make it easier to specify just the tag using `-j`. The following two invocations of `bst-here` are now equivalent: bst-here -i buildstream/buildstream:dev bst-here -j dev
| * contrib/bst-here: Change default image to buildstream/buildstreamChandan Singh2019-02-151-1/+1
|/ | | | | | | | | See https://gitlab.com/BuildStream/buildstream-docker-images/issues/26 for detailed discussion around this. `buildstream/buildstream-fedora` is now considered deprecated. Switch to `buildstream/buildstream` image. This image also offers more tags that will provide users more flexibility.
* Merge branch 'are_you_sure2' into 'master'Angelos Evripiotis2019-02-154-44/+13
|\ | | | | | | | | | | | | userconfig: rm really-workspace-close-project-inaccessible Closes #726 and #744 See merge request BuildStream/buildstream!1130
| * userconfig: rm really-workspace-close-project-inaccessibleare_you_sure2Angelos Evripiotis2019-02-154-44/+13
|/ | | | | | | | | | | | | | | | | | | | | | | | | Remove the need for the 'really-workspace-close-project-inaccessible' config option, as well as the option itself. As agreed on the mailing list [1], all the 'are you sure?' prompts on workspace reset and close were removed. While that discussion was going on, this new prompt and option was added. At the 2019 BuildStream Gathering, it was verbally agreed between myself and Tristan VB that we would also remove this instance. It was also agreed that we should have a notice to let the user know what they'd done, this was already in place if interactive. Moved it to be unconditional so that there's no difference in non-interactive behaviour. Made it output to stderr, as it's diagnostic meant for the user. Made it the last thing echo'd so it's next to the prompt - it's very relevant to what they type next. Added a test to make sure the text makes it to stderr in the appropriate case, and not in an inappropriate one. This is the last instance of any prompt configuration, so BuildStream can also forget all of that machinery. [1] https://mail.gnome.org/archives/buildstream-list/2018-December/msg00111.html
* Merge branch 'bschubert/set-as-set' into 'master'Benjamin Schubert2019-02-153-16/+12
|\ | | | | | | | | Use sets when checking for existence of an element See merge request BuildStream/buildstream!1154
| * Use sets when checking for existence of an elementBenjamin Schubert2019-02-153-16/+12
|/
* Merge branch 'aevri/mtime1' into 'master'Angelos Evripiotis2019-02-154-4/+25
|\ | | | | | | | | | | | | storage.Directory.export_to_tar: default mtime=utils._magic_timestamp Closes #914 See merge request BuildStream/buildstream!1149
| * storage.Directory.export_to_tar: mtime=_magic...aevri/mtime1Angelos Evripiotis2019-02-154-4/+25
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the default value of mtime when doing export_to_tar() from `0` to `_utils._magic_timestamp`. This avoids problems in other software, which assume that an mtime of `0` means the file does not exist. There is more than one example where files with an mtime of zero are treated as non-existant by other software. e.g. [ninja][1] and [Template Toolkit][2]. The OSTree project also [express an intention][3] to move from an mtime of 0 to an mtime of 1: > For this reason, OSTree acts as though all timestamps are set to > time_t 0, so that comparisons will be considered up-to-date. Note that > for a few releases, OSTree used 1 to fix warnings such as GNU Tar > emitting "implausibly old time stamp" with 0; however, until we have a > mechanism to transition cleanly to 1, for compatibilty OSTree is > reverted to use zero again. From the comments on export_to_tar(), the motivation for having an mtime of 0 was to have reproducible results, rather than it specifically being the value 0. Additionally, the reproducible builds project has a [page on archives][4]; it mentions the benefits of setting all the files to have the same mtime, or clamping the mtime. It makes no mention of a motivation for the mtime to be specifically 0. Fixes #914 [1]: https://github.com/ninja-build/ninja/issues/1120 [2]: https://github.com/abw/Template2/blob/8d7d37200af436f1ad43628278d3caad257c8e27/lib/Template/Provider.pm#L635 [3]: https://ostree.readthedocs.io/en/latest/manual/repo/ [4]: https://reproducible-builds.org/docs/archives/
* Merge branch 'danielsilverstone-ct/variables-rework' into 'master'Benjamin Schubert2019-02-153-133/+182
|\ | | | | | | | | Variables: Rework how expansion strings work See merge request BuildStream/buildstream!1152
| * Variables: Rework how expansion strings workDaniel Silverstone2019-02-153-133/+182
|/ | | | | | | | Rather than constantly using regular expressions and retrieval from YAML nodes, pre-parse expansion strings into a list representation cached for reuse, and then expand them as simple string concatenation. Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
* Merge branch 'chandan/dot-graph' into 'master'Chandan Singh2019-02-151-0/+107
|\ | | | | | | | | | | | | contrib/bst-graph: Add script to print graph in DOT format Closes #705 See merge request BuildStream/buildstream!1148
| * contrib/bst-graph: Add script to print graph in DOT formatchandan/dot-graphChandan Singh2019-02-151-0/+107
|/ | | | | | | | | | This script leverages the recently added format strings (`%{build-deps}`, `%{runtime-deps}`) to `bst show` to print a graph in DOT format. This requires users to have the `graphviz` python package installed. Additionally, users can also render the graph using the `--format` option if they have the `graphviz` command line tool installed.
* Merge branch 'juerg/symlinks2' into 'master'Jürg Billeter2019-02-1436-333/+86
|\ | | | | | | | | Do not resolve or mangle symlinks during staging See merge request BuildStream/buildstream!1140
| * NEWS: Add entry for change in symlink handlingJürg Billeter2019-02-141-0/+4
| |
| * Bump artifact version for changes in symlink handlingJürg Billeter2019-02-1430-30/+30
| |
| * utils.py: Do not mangle absolute symlinksJürg Billeter2019-02-142-59/+4
| | | | | | | | | | Copy symlinks as they are, absolute or relative. We no longer resolve symlinks when copying files, which makes this safe.
| * _casbaseddirectory.py: Do not resolve symlinksJürg Billeter2019-02-142-192/+11
| | | | | | | | | | | | | | | | 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.
| * utils.py: Change _ensure_real_directory() to not resolve symlinksJürg Billeter2019-02-143-52/+37
|/ | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge branch 'bschubert/dont-keep-metasource' into 'master'Tristan Van Berkom2019-02-141-4/+14
|\ | | | | | | | | Don't keep MetaSource around in Source See merge request BuildStream/buildstream!1150
| * Don't keep MetaSource around in Sourcebschubert/dont-keep-metasourceBenjamin Schubert2019-02-141-4/+14
|/ | | | | | | We can easily rebiuld MetaSource from any source so there is no reason to keep them around. This will slightly improve memory usage.
* Merge branch 'danielsilverstone-ct/json-cache-key' into 'master'Tristan Van Berkom2019-02-1433-33/+36
|\ | | | | | | | | Update cache keys to use JSON See merge request BuildStream/buildstream!1151
| * Cache Keys: Update to use JSON rather than pickledanielsilverstone-ct/json-cache-keyDaniel Silverstone2019-02-1433-33/+36
|/ | | | | | | | This affects the cache key version (updated to 7) and introduces a dependency on `ujson` which is BSD licenced as of the version locked in `requirements.txt` Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
* Merge branch 'bschubert/cleanup-local-state' into 'master'Benjamin Schubert2019-02-134-5/+47
|\ | | | | | | | | Cleanup MetaElement local state See merge request BuildStream/buildstream!1147
| * Don't register exceptions when not running the testsuitebschubert/cleanup-local-stateBenjamin Schubert2019-02-131-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix a problem with the garbage collector not being able to clean the MetaElements that are loaded. On small projects this is not a problem, but in bigger projects, this can save a few hundred of MBs at runtime The reason behind this is, whenever we have a "stack" element, which has no stack.yaml configuration, since it doesn't need it, we would get an exception thrown when initiating the first one, as loading the yaml file would fail. This would capture the frame in which this command was executed, which references meta_elements. Therefore, as long as another exception is not thrown, the garbage collector would not be able to clean all the MetaElements.
| * Cleanup internal Loader cache after loading elementsBenjamin Schubert2019-02-133-0/+36
|/
* Merge branch 'tpollard/896' into 'master'Jürg Billeter2019-02-139-17/+242
|\ | | | | | | | | | | | | Optional creation of buildtrees Closes #896 See merge request BuildStream/buildstream!1135
| * Provide configuration for the optional creation of buildtreestpollard/896Tom Pollard2019-02-134-14/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * _frontend/cli.py: Ensure failed buildtree warning is correctTom Pollard2019-02-131-1/+2
| | | | | | | | | | | | 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
| * Add cli main & user conf option for 'cache-buildtrees' contextTom Pollard2019-02-135-2/+24
|/ | | | | | | | | | | | | _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.
* Merge branch 'juerg/list-all-directories' into 'master'Jürg Billeter2019-02-1333-41/+44
|\ | | | | | | | | Return all directories in list_relative_paths() See merge request BuildStream/buildstream!1139
| * _casbaseddirectory.py: Return all directories in list_relative_paths()Jürg Billeter2019-02-131-4/+4
| | | | | | | | This matches the change in utils.list_relative_paths().
| * utils.py: Return all directories in list_relative_paths()Jürg Billeter2019-02-1315-22/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Returning only empty directories leads to inconsistencies when computing a manifest by combining results from multiple list_relative_paths() calls as done by the compose plugin. I.e., the same directory may be empty in one dependency and non-empty in another dependency. The merged file list will still contain that directory even though it's no longer empty. This inconsistency causes problems when calculating differences between manifests. Returning all directories fixes these inconsistencies. This is a change in API behavior.
| * tests/integration/project: Add tests directory to split ruleJürg Billeter2019-02-131-0/+2
| | | | | | | | | | This is required to fix tests with the following commit that changes list_relative_paths() to return all directories.
| * projectconfig.yaml: Consistently include directories in split rulesJürg Billeter2019-02-1330-29/+35
|/ | | | | | | | | Most split rules already included the relevant directories themselves in addition to the directory contents. Add the missing bin, sbin, and libexec directories. This is required to fix tests with the following commit that changes list_relative_paths() to return all directories.
* Merge branch 'jennis/refactor_artifact_log' into 'master'James Ennis2019-02-1311-200/+375
|\ | | | | | | | | Refactor artifact log command See merge request BuildStream/buildstream!1101
| * _stream.py: _classify_artifacts() should be able to handle globsjennis/refactor_artifact_logJames Ennis2019-02-131-13/+11
| | | | | | | | | | | | | | | | | | _classify_artifacts() no longer filters glob expressions by first obtaining a list of ALL refs locally cached. We now only obtain refs specified by the glob expression. Furthermore, the Project.element_path is used to start searching for globbed elements as opposed to the Project.directory.
| * cascache.py: Allow CASCache.list_refs() to handle globsJames Ennis2019-02-132-7/+24
| | | | | | | | | | This commit ensures that CASCache.list_refs(), and ArtifactCache.list_artifacts(), can both handle glob expressions.
| * cli.py: Remove _classify_artifacts() methodJames Ennis2019-02-131-33/+0
| | | | | | | | This method has been moved to Stream, where is it used there exclusively.
| * cli.py: Move artifact ref handling logic to streamJames Ennis2019-02-132-47/+43
| | | | | | | | | | The loading of elements and the handling of artifacts does not belong in this module. Such logic should be invoked using the Stream API
| * _artifactcache.py: Add get_artifacts_log() methodJames Ennis2019-02-131-0/+17
| | | | | | | | | | | | | | A CasBasedDirectory object of an artifacts logs can be obtained with ArtifactCache.get_artifacts_log(). This ultimately calls CASCache.get_top_level_dir() to obtain a CasBasedDirectory of an artifact's subdirectory (or subdirectories).
| * _stream.py: Allow loading to handle artifact refsJames Ennis2019-02-131-14/+32
| |
| * _stream.py: Modify behaviour of _classify_artifacts()James Ennis2019-02-131-17/+23
| | | | | | | | | | | | * There is no need for this method to use a cas object. * Search for artifact globs in the project's element path * An artifact key is always 64 chars long
| * _stream.py: Add the _classify_artifacts() helperJames Ennis2019-02-131-0/+45
| |
| * _project.py: Add create_artifact_element() methodJames Ennis2019-02-131-0/+14
| |
| * _artifactelement.py: New ArtifactElement object (derived from Element)James Ennis2019-02-132-0/+97
| | | | | | | | | | | | This object should be used when we want to handle artifact refs directly from the command line. An ArtifactElementError has also been added to _exceptions.py