summaryrefslogtreecommitdiff
path: root/buildstream/element.py
Commit message (Collapse)AuthorAgeFilesLines
...
* element.py: Add _remotely_cached()Jürg Billeter2017-07-201-0/+37
|
* element.py: Do not fail with artifacts with pre-workspace metadataJürg Billeter2017-07-201-2/+8
|
* element.py: Encode workspaced dependencies in metadataTristan Maat2017-07-171-5/+28
|
* element.py: Make element dependencies affect taint statusTristan Maat2017-07-171-8/+19
|
* element.py: Prevent workspaced artifacts from being pushedTristan Maat2017-07-171-2/+57
|
* element.py: Added public variant attributeTristan Van Berkom2017-07-171-0/+8
| | | | | Reflects the selected variant at load time, otherwise None for elements which do not declare any variants.
* element.py: Add strength parameter to _cached()Jürg Billeter2017-07-141-2/+12
|
* element.py: Remove _set_cached()Jürg Billeter2017-07-141-10/+0
| | | | | Use _cached(recalculate=True) instead to reduce the number of code paths touching __cached.
* element.py: Use appropriate cache key in _get_full_display_key()Jürg Billeter2017-07-141-4/+13
|
* element.py: Use _get_cache_key_for_build() for artifact.yamlJürg Billeter2017-07-141-2/+17
| | | | This will only make a difference when building with weak cache keys.
* element.py: Add _get_cache_key_from_artifact()Jürg Billeter2017-07-141-9/+34
|
* element.py: Store cache keys as artifact metadataJürg Billeter2017-07-141-0/+12
|
* element.py: Calculate weak cache key in addition to strong cache keyJürg Billeter2017-07-141-2/+33
| | | | | Weak cache keys include names of direct build dependencies but do not include cache keys of dependencies.
* element.py: Add __calculate_cache_key()Jürg Billeter2017-07-141-27/+37
|
* Move ArtifactError to exceptions.pyJürg Billeter2017-07-141-3/+2
| | | | This avoids cyclic imports between element.py and artifactcache.py.
* element.py: Add _get_full_display_key()Jürg Billeter2017-07-141-9/+28
|
* element.py: Element._push() returns boolean, indicating whether an upload ↵Tristan Van Berkom2017-07-111-1/+5
| | | | was needed
* element.py: Renamed Element.fetch() to Element.pull()Tristan Van Berkom2017-07-101-9/+31
| | | | | | For better readability; also now avoid the FAILURE messages when an artifact fails to be pulled, replaced with self.info() message only if the artifact was downloaded.
* Only run integration commands on checkout for native-built artifactsSam Thursfield2017-07-061-4/+5
| | | | | | | One day BuildStream will be able to run host-incompatible integration commands using a QEMU cross-sandbox, but for now we have to disable integration commands for cross-builds to avoid errors when checking them out.
* element.py: Use _yaml.node_copy() instead of deepcopy for public dataTristan Van Berkom2017-07-051-2/+2
| | | | | This avoids potentially infinate loops caused by peeking into the the Provenance nodes and attempting to copy those references.
* element.py: Fix pep8 error from my previous commitTristan Van Berkom2017-07-051-1/+1
|
* element.py: Added Element.set_public_data()Tristan Van Berkom2017-07-051-1/+34
| | | | | | And use deep copies with both Element.set_public_data() and Element.get_public_data(), avoiding unintentional mutations of the underlying data model.
* element.py: _cached() and _assert_cached() now takes tristate 'recalculate'Tristan Van Berkom2017-07-051-6/+17
| | | | | | | | | | | | o None: Calculate cache state if not previously calculated o True: Force recalculate cached state, even if already checked o False: Only return cached state, never recalculate automatically And _load_public_data() passes and explicit False value for 'recalculate', this ensures we never accidentally resolve cached state prematurely if trying to load the public data as a side effect of calling Element.get_public_data() outside of the build phase, when all elements in scope should have cached state resolved and correct anyway.
* element.py: Support dynamic public dataJürg Billeter2017-07-051-2/+18
| | | | | | Plugin assemble() methods may supplement public data returned by Element.get_public_data() with generated data. Public data is stored in the artifact cache and automatically loaded as appropriate.
* element.py: Do not compile splitters in constructorJürg Billeter2017-07-051-3/+4
| | | | This is too early for dynamic split rules.
* element.py: Commit public data to artifact cacheJürg Billeter2017-07-051-0/+5
|
* element.py: Include static public data for cache key generationJürg Billeter2017-07-051-13/+1
| | | | | This will be required when public data will be stored in the artifact cache in preparation for dynamic public data support.
* element.py: Commit build log to artifact cacheJürg Billeter2017-07-051-3/+11
|
* element.py: Move build output to files subdirectoryJürg Billeter2017-07-051-4/+13
|
* Ensure element permissions are set to euid and egid after stagingTristan Maat2017-07-041-0/+2
|
* element.py: Fix dependency handling in cache key calculationJürg Billeter2017-07-041-1/+1
| | | | | | Runtime dependencies of build dependencies can affect the build process. This reverts commit b0a196a8cb34964e7c0af2fa74c8ada8bc0408c8.
* element.py: Removed _direct_deps() APITristan Van Berkom2017-07-011-21/+3
| | | | | | | | | | | | | | This API comes from a time when Element.dependencies() did not have a `recurse` keyword argument (as we did not expect to require that functionality to be public). Since the same can be accomplished with Element.dependencies(... recurse=False), it's better to just remove this old private API (which was actually broken and recently fixed with commit b194179d422b65ce8eaa599901b0362840584adb). NOTE: Tried this change on a pipeline with > 500 elements, and the reported cache keys are the same using Element.dependencies() as they were with the older Element._direct_deps() API.
* element.py: Fix behaviour of Element._direct_deps(Scope.BUILD)Sam Thursfield2017-06-301-1/+1
| | | | | | | This function was swapping the behaviour of Scope.BUILD with Scope.ALL. This caused an issue where runtime dependencies of a component were being included in its cache key, causing unnecessary rebuilds.
* element.py: Docstring fixTristan Van Berkom2017-06-301-3/+3
| | | | Use proper note.
* element.py: Expect glob style split rulesTristan Van Berkom2017-06-301-1/+1
|
* element.py: Now use FileListResult, and return it from Element.stage_artifact()Tristan Van Berkom2017-06-291-12/+8
|
* Fix accidental permission changesTristan Maat2017-06-281-0/+0
|
* Add script templatesTristan Maat2017-06-281-0/+1
|
* element.py: Add generate_script APITristan Maat2017-06-281-2/+53
|
* element.py: Add _stage_sources_atTristan Maat2017-06-281-7/+17
|
* Artifact fetch supportJürg Billeter2017-06-271-0/+14
|
* Artifact push supportJürg Billeter2017-06-271-0/+29
|
* element.py: Allow forceful reinterrogation of cached stateJürg Billeter2017-06-261-1/+7
|
* element.py: Use SandboxFlags.INTERACTIVE for running shellsTristan Van Berkom2017-06-201-1/+2
|
* element.py: Added _prepare_sandbox() context managerTristan Van Berkom2017-06-141-12/+25
| | | | | Just a way we can share some code between `bst shell` and the `bst checkout` codepath.
* element.py: Fix regression with setting deterministic mtime on source stagesTristan Van Berkom2017-06-141-1/+1
| | | | | This was causing the tarball builds, like stage2-make from baserock, to break as it wanted to regenerate some files it could not.
* element.py: Split up assemble into three methods.Tristan Van Berkom2017-06-121-75/+97
| | | | | | | | | | Some elements may continue to do everything inside assemble(), however they will not support shelling in properly, this is sometimes normal, as with import elements. The shell implementation has been enhanced with this, as it will now setup the shell in Scope.BUILD scope the same way the element would when it's about to assemble.
* Jonathan/enhance script elementJonathan Maw2017-06-061-0/+20
|
* element.py: Check for existence of hard coded env varsTristan Van Berkom2017-06-031-1/+2
| | | | | If env vars propagated to a shell happen to be unset (None), then running the sandbox will cause a stack trace from subprocess.
* Revert "element.py: Protect against variable substitutions outside of ↵Tristan Van Berkom2017-05-311-10/+0
| | | | | | | | | | | | | | Element.configure()" This reverts commit ad48cee1171c465bad966d2cb1c8f120fca67176. This was too hasty, we need to consider integration commands which currently substitute variables in the integration stages, and soon integration commands might be set dynamically after an assemble stage, so variable substitutions on integration commands can be allowed at this point, especially considering how integration commands are considered in cache key calculations. This will require more thought.