summaryrefslogtreecommitdiff
path: root/buildstream/element.py
Commit message (Collapse)AuthorAgeFilesLines
* element.py: Removing unconditional INFO message when stagingTristan Van Berkom2017-12-051-1/+0
| | | | This seems to be debug print left around in the branch.
* Produce a more in-depth report of overlaps when stagingJonathan Maw2017-12-011-9/+23
| | | | | The information provided by link_files is not sufficient to know which element had the overlapped file.
* element.py: Some changes to the added compute_manifest() methodTristan Van Berkom2017-11-201-10/+2
| | | | | | | | o Use the * parameter to denote keyword-only arguments o Remove the docs mentioning that it is specifically for the compose element use case, while it's only used here currently, it is not necessarily true.
* Handle removed files from integration in compose pluginValentin David2017-11-201-0/+28
| | | | Fixes issue #147
* element.py: Fixed manual signature override in docstringTristan Van Berkom2017-11-161-1/+1
| | | | | | | Now that recurse is a mandatory keyword argument, the docs should also reflect this; this must be done manually because we override the signature here in the docstring, to hide some private arguments.
* element.py: Change node_subst_member's 'default_value' field to 'default'Jonathan Maw2017-11-141-5/+5
|
* Make node_get_member pass default values as positional argsJonathan Maw2017-11-141-2/+2
| | | | | It is functionally similar to dict.get() and fulfills the same role, so it should be used that way.
* Make Element.depends use mandatory keyword argsJonathan Maw2017-11-141-1/+1
| | | | | Since the 'recurse' arg is a boolean, using it as an argument without a keyword is likely to cause confusion.
* Apply pep 3102 to element's stage_artifact and stage_dependency_artifactsJonathan Maw2017-11-141-2/+2
| | | | | The arguments are optional, and none of the arguments depend on each other, meaning that they do not make sense as optional positional arguments.
* Refactor, remove some unused imports138-aborting-bst-push-command-causes-stack-traceAngelos Evripiotis2017-11-131-2/+0
| | | | | | | When reading element.py, I was surprised that it was importing 'inspect'. Remove that import and some other unused ones to improve readability.
* Remove DummyElement hackTristan Maat2017-11-101-17/+25
|
* Refactor: Move context.py -> _context.pyTristan Van Berkom2017-11-081-6/+6
| | | | | | | | | | Consequently: o Changed Plugin.get_context() to a private Plugin._get_context() accessor. o Updated anything which imports Context to do so from private _context module o Updated docs to exclude the now private Context
* refactoring: Made Project option privateTristan Van Berkom2017-11-061-10/+10
| | | | | | | | | | | | | | This required adding two new APIs to make up for it on the Source o get_project_directory() Added here because elements should not be accessing external resources, Sources needed for local files and GPG keys and such o translate_url() Used by sources to mish-mash the project aliases and create real urls.
* Refactoring: Renamed _BstError -> BstErrorTristan Van Berkom2017-11-061-3/+3
| | | | | | Base class for exceptions is now a part of the already private _exceptions module Also moved PipelineError from _pipeline -> _exceptions module
* Refactoring: Rename _ArtifactError -> ArtifactErrorTristan Van Berkom2017-11-061-1/+1
| | | | This is now part of the already private _exceptions module
* Refactoring: Move exceptions module to be privateTristan Van Berkom2017-11-061-2/+1
| | | | Hide all of buildstream's internal exceptions from the API surface.
* Refactoring: Move ElementError and SourceError to their respective classes, ↵Tristan Van Berkom2017-11-061-11/+20
| | | | | | | | | | create SandboxError These errors are a part of public facing API, and the exceptions module contains a lot of internal details to be hidden from public API. This move required creating SandboxError because sandbox related code had previously been hijacking the ElementError and raising that.
* Clean old Platform.get_platform referencesTristan Maat2017-11-011-1/+1
|
* element.py: Adapt to new Context api _get_strict()Tristan Van Berkom2017-10-271-3/+16
|
* element.py: Raise an error if the source staging directory is non-emptyTristan Van Berkom2017-10-221-0/+4
| | | | | This is the correct place for the check, once for each element in the overall source staging directory.
* element.py: Updated for _yaml.composite() API changesTristan Van Berkom2017-10-171-13/+13
|
* 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.