summaryrefslogtreecommitdiff
path: root/buildstream/element.py
Commit message (Collapse)AuthorAgeFilesLines
* element.py: Fix cleanup after collection of artifact with read-only directoriesfix-artifact-cleanupTristan Van Berkom2017-10-131-47/+40
| | | | | | | | | | Part of issue #81 This was failing because the tmpdir contextmanager was trying to still use it's own mechanics to cleanup the artifact assembly directory. This is fixed by *not* using a tmpdir, which was just wrong to begin with because we're already working inside a temp directory.
* element.py: Force remove artifact assembly directory on failure to commitTristan Van Berkom2017-10-131-2/+10
| | | | | | This is there because an ArtifactError on failure to commit indicates some permissions issue with the directory structure, and it's better to not leave this dangling behind for users to deal with.
* Ensure that artifact file permissions are set in the right orderTristan Maat2017-10-131-3/+3
|
* element.py: Removed public variant member, obsoleteTristan Van Berkom2017-10-081-8/+0
| | | | | This was used to show which variants had been selected when printing out the pipeline.
* Use _yaml.node_items() across the board, instead of casing _yaml.PROVENANCE_KEYTristan Van Berkom2017-10-011-3/+4
| | | | | Consequently improved _yaml.node_sanitize() to omit a crazy lambda which had no effect at all on the outcome of the function.
* Add platform factoriesTristan Maat2017-09-281-12/+11
|
* Add support for YAML default config loadingTristan Maat2017-09-141-10/+4
|
* element.py: Changed Element._shell() behaviors.Tristan Van Berkom2017-09-101-5/+7
| | | | | | o The command argument is a list, not a string o The default value for the command list is ['sh', '-i'] o The sandbox is always run interactively
* element.py: Use the BST_ARTIFACT_VERSION declared in the project.py moduleTristan Van Berkom2017-09-041-7/+2
|
* documentation: Set page titles manually in python modules.Tristan Van Berkom2017-08-311-0/+5
|
* element.py and plugins: Changed Element.strict_rebuild APITristan Van Berkom2017-08-301-2/+2
| | | | | | 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.
* element.py: Changing artifact version APITristan Van Berkom2017-08-301-29/+18
| | | | | | | | | | | Starting to go with using class attributes in some cases for the plugin to communicate static things like required version and strict rebuild policies. This is interesting because class attributes suggest that you cannot return something dynamic, and at the same time class attributes are useful at times when you have a plugin type but no instance.
* element.py: Changed artifact staging apis to have an 'exclude' argumentTristan Van Berkom2017-08-291-15/+38
| | | | | | | | | Instead of just being able to specify what domains to include and whether to include orphans, also specify what domains to exclude. This allows one to deal with situations with overlapping rules more dynamically; i.e. one can include all of `/usr/bin/*` and then specifically exclude `/usr/bin/gcc` by itself.
* element.py: Add optional command argument to _shell()Jürg Billeter2017-08-171-5/+12
| | | | If specified, the command will run in non-interactive mode.
* element.py: Allow calling _skip_push() for uncached elementsJürg Billeter2017-08-081-1/+2
| | | | This is required when using a push queue without build queue.
* element.py: Fix broken exception for non-strict rebuilds of certain elements ↵Tristan Van Berkom2017-07-311-1/+1
| | | | | | | (strict_rebuild) This was doing a non-recursive calculation of weak cache keys, but the intention was to do a recursive one; this is why my demo was an epic failure.
* element.py: Added strict_rebuild class attributeTristan Van Berkom2017-07-291-3/+15
| | | | | | | | | | This allows plugin types to declare that their instances must be rebuilt when their dependencies change in non-strict build mode. This is specifically for non-strict builds and allows appropriate reassembly of composition elements, which take their dependencies as verbatim input to create output.
* element.py: Fix self.__public being written to during buildsJonathan Maw2017-07-261-1/+1
|
* element.py: Introduce artifact versionsJürg Billeter2017-07-251-0/+29
| | | | Fixes #49
* element.py: Check consistency before recursion in _get_cache_key()Jürg Billeter2017-07-251-8/+8
|
* element.py: Remove _built() and _set_build()Jürg Billeter2017-07-201-19/+0
| | | | They are no longer needed.
* element.py: Add _skip_push()Jürg Billeter2017-07-201-0/+17
|
* element.py: Consider pull failure fatalJürg Billeter2017-07-201-22/+5
| | | | | Build planning uses list of artifacts in remote artifact cache. Pull failures cannot be ignored.
* 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.