summaryrefslogtreecommitdiff
path: root/buildstream/plugins/elements/compose.py
Commit message (Collapse)AuthorAgeFilesLines
* compose.py: Support batching for integration commandsJürg Billeter2018-11-271-2/+3
|
* Fix spelling of it's and itsRichard Dale2018-10-161-1/+1
|
* compose.py: Remove unused getmtime()Jim MacArthur2018-08-011-7/+0
|
* plugins/elements/compose.py: Convert to virtual directoriesJim MacArthur2018-08-011-25/+13
|
* Remove shebangs from python filesGökçen Nurlu2018-06-191-1/+0
| | | | Fixes #424
* doc: Added plugins as ToC elements instead of orphaned linksTristan Van Berkom2018-06-091-2/+3
| | | | | | | | | | | | o Now the page titles are declared in plugins, allowing for a more descriptive ToC o Makefile and plugin.rsttemplate updated to not produce the title, to no longer use `:orphan:` for plugin pages, and to ignore any private modules in the plugin directories. o Interestingly, now the docs will fail to build if you add a new plugin and forget to add it to the documentation.
* plugins/elements/compose.py: Avoid losing files inside directory symlinksSam Thursfield2018-04-231-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic for determining which files were removed by integration commands was broken when dealing with files staged within symlink directories. This rather weird scenario is only possible because of the way BuildStream layers artifacts. If artifact 1 contains a symlink from `/sbin` to `/usr/sbin`, and artifact 2 is staged on top and contains a file `/sbin/init`, then the resulting filesystem contains a file at `/usr/sbin/init`. The manifest used by the compose element is generated from the contents of the individual artifacts, so it lists the original paths such as `/sbin/init`, but would would not contain `/usr/sbin/init` as nothing has processed the symlinks. The path `/sbin/init` is valid inside the composed tree, but filesystem traversals that don't follow symlinks will not report that path in their results. The compose plugin would look for `/sbin/init` in the results of `utils.list_relative_paths()`, find it missing, and would act as if some integration command had removed the file. This meant it would not end up in the results. To fix this, I have inverted the logic that processes the results of the integration commands. We now work through every path in the manifest and check it against the results of the integration commands, rather than the other way around, and if any path from the manifest doesn't appear in the snapshot we assume that it has staged in a different location due to symlinks. See: https://gitlab.com/BuildStream/buildstream/issues/270
* plugins/elements/compose.py: Only calculate snapshot when neededSam Thursfield2018-04-231-5/+8
| | | | | | This is an optimisation for the case where the compose element doesn't do any splitting, and also brings 2 related code fragments closer to each other.
* plugins/elements/compose.py: Use sets instead of lists where appropriateSam Thursfield2018-04-231-7/+8
| | | | | There is no significant order for the lists of added, removed and modified files, so use an unordered set() to store the data.
* plugins: Disable attribute-defined-outside-init pylint errorTristan Van Berkom2018-04-201-0/+1
| | | | | Plugins set their attributes in configure(), because the constructor is not public API.
* Remove unused importsJürg Billeter2018-03-251-1/+1
|
* compose: Use built-in checks on runtime depends and sourcesJonathan Maw2018-03-011-11/+9
|
* compose.py: key dictionary is now correctly initialisedJames Ennis2018-02-281-4/+3
|
* Remove all deleted paths from manifest after integration commands inValentin David2017-11-271-1/+3
| | | | | | | | | | compose plugin including paths still reachable through following of symbolic links. Keeping reachable paths through following of symbolic links in manifest. Can lead to ENOENT error when copying the file if target directory of a symbolic link is not yet created. The file is anyway copied since the real path of the file is also in the manifest.
* plugins/elements/compose.py: post merge fixing of compose elementTristan Van Berkom2017-11-201-19/+27
| | | | | | | | | | o Some things changed in master since this patch, notably the keyword only arguments have changed o Enhanced the user feedback to mention removed, added and modified files resulting from running integration o Dont silence messages while integrating the sandbox
* Handle removed files from integration in compose pluginValentin David2017-11-201-20/+30
| | | | Fixes issue #147
* compose.py: Use keyword args for utils.move_filesJonathan Maw2017-11-141-1/+1
|
* Add element plugin node validationsTristan Maat2017-09-141-0/+4
|
* element.py and plugins: Changed Element.strict_rebuild APITristan Van Berkom2017-08-301-1/+5
| | | | | | Instead use BST_STRICT_REBUILD and follow a new pattern we're using for any class attributes used for the plugin to communicate static data back to the core.
* compose.py plugin: Expose a new `exclude` option.compose-excludeTristan Van Berkom2017-08-291-19/+30
| | | | | | | | Using the new enhanced Element API for staging, allow the user to specify domains to exclude as well as domains to include. Fixes issue #78
* compose.py plugin: Mark for strict_rebuildTristan Van Berkom2017-07-291-0/+2
|
* compose.py: Ensure include list order does not effect cache keysTristan Van Berkom2017-07-051-1/+1
|
* compose.py: Simplify cache key generationJürg Billeter2017-07-051-30/+1
| | | | | | Public data is now included when generating an element's cache key. Due to this it is no longer necessary to include the split rules of dependencies in the compose element's cache key calculation.
* compose.py: Fix possibility of referencing undefined variableTristan Van Berkom2017-06-221-0/+1
| | | | This is just a bit safer than the change proposed in MR 31.
* compose.py: Adapting to Element API churnTristan Van Berkom2017-06-121-5/+11
|
* compose.py element plugin: Take into account modified files in integrationTristan Van Berkom2017-04-031-3/+14
| | | | | | Instead of only moving over *added* files into the composition, also move over any files which were *modified* by running integration commands into the composition.
* compose.py plugin: Improved loggingTristan Van Berkom2017-04-031-2/+15
|
* compose.py: Fixed preflight error to include selfTristan Van Berkom2017-03-161-1/+1
|
* compose.py: Removed unused import of re moduleTristan Van Berkom2017-03-161-1/+0
|
* compose.py: Fixed comment to use its, not it'sTristan Van Berkom2017-03-151-1/+1
|
* element.py: Added stage_dependencies() convenience function.Tristan Van Berkom2017-03-151-7/+5
| | | | | | | | | | | | This iterates over the elements dependencies and stages them somewhere in a sandbox. This is especially interesting because of the added warnings it gives you about the file overlaps and ignored files which would otherwise overwrite non-empty directories. Also updated build and compose elements to use this in place of manually looping.
* Added new compose elementTristan Van Berkom2017-03-151-0/+160
This creates a selective composition of its dependencies.