summaryrefslogtreecommitdiff
path: root/buildstream/source.py
Commit message (Collapse)AuthorAgeFilesLines
* source.py: Fix missing files when calculating sha256sumTristan Maat2017-07-171-4/+9
|
* source.py: Add workspace APITristan Maat2017-07-171-1/+77
|
* source.py: Use the new utils._tempdir() utility to implement Source.tempdir()Tristan Van Berkom2017-07-091-11/+2
|
* source.py: Ensure 'directory' exists in _stageJonathan Maw2017-06-221-0/+1
| | | | | | | | | It is usually created by integration commands when staging dependencies, but we cannot rely on this as some elements have no dependencies, and some sources handle the non-existence of 'directory' better than others. To avoid mandating that every source must be able to cope with 'directory's not existence, source will ensure it exists.
* source.py: Added _force_inconsistent() methodTristan Van Berkom2017-05-291-1/+15
| | | | | For initializing a pipeline in a forcefully inconsistent state, this is required for pipelines which execute TrackQueues.
* source.py: Allow forceful reinterrogation of consistency stateTristan Van Berkom2017-05-281-2/+2
|
* source.py: Added tempdir() context managerTristan Van Berkom2017-04-081-1/+27
| | | | | | This is for Source implementations to use a temp directory, this should be used instead of python tempdir APIs because it will cleanup the tempdir automatically in the case of user provoked termination.
* Refactor: Untangling element/source namesTristan Van Berkom2017-03-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | o The metaelements and metasources now carry the name, the loader resolves source names now. o Element/Source factories dont require a name anymore as they are already in the meta objects o Pipeline no longer composes names o Element.name is now the original project relative filename, this allows plugins to identify that name in their dependencies, allowing one to express configuration which identifies elements by the same name that the user used in the dependencies. o Removed plugin._get_display_name() in favor of the plugin.name o Added Element.normal_name, for the cases where we need to have a normalized name for creating directories and log files o Updated frontend and test cases and all callers to use the new naming
* source.py: Fix _set_ref() to not try to manually recalculate the cacheTristan Van Berkom2017-01-251-1/+0
| | | | This was missed in the previous changes regarding caching
* source.py: Removed recalculate argument from _get_consistency()Tristan Van Berkom2017-01-201-4/+5
|
* source.py: API change consistent() -> get_consistency()Tristan Van Berkom2017-01-191-18/+42
| | | | Now adds Consistency class for consistency options
* source.py: Removed refresh(), added reference accessor/mutatorTristan Van Berkom2017-01-181-26/+62
| | | | | | | | | | | | | | | Now we have a different API around refreshing tracking references: o get_ref(): Source should return currently set reference o set_ref(): Source should update current ref, and update the passed yaml node o track(): Return the latest reference for a symbolic tracking ref, this may involve network usage enough to track the new ref. This way we dont try to serialize entire yaml documents over the subprocess pipe, some of the formatting I think may have been lost in serialization.
* source.py: Added _stage() wrapper method.Tristan Van Berkom2017-01-181-0/+9
| | | | | This internal method acts as a controller method and does the conversion for the 'directory' parameter.
* source.py: INFO message when a source ref changesTristan Van Berkom2017-01-141-0/+2
|
* source.py: Now constructor takes a display_nameTristan Van Berkom2017-01-121-2/+2
|
* source.py: Wrap some abstract methodsTristan Van Berkom2017-01-111-0/+26
| | | | | Use _refresh() and _consistent() internally, now we cache the consistent state making things a bit less loopy
* source.py: Added consistent() abstract method.Tristan Van Berkom2017-01-091-0/+13
| | | | | | | This is expected to return True if the ref is set and the source can be fetched and staged, otherwise False. If a source is inconsistent, it means that it needs to be sucessfully refreshed (from any track that might be supported in the source).
* source.py: Document ->refresh() to return a booleanTristan Van Berkom2017-01-071-0/+3
| | | | Now refresh returns True if the refresh resulted in any change.
* source.py: Derive from new Plugin common classTristan Van Berkom2017-01-071-91/+7
|
* source.py: Allow Source object to be stringified.Tristan Van Berkom2016-12-191-0/+6
| | | | Same should be done for Elements.
* source.py: Added get_mirror_directory() and enhanced docsTristan Van Berkom2016-12-191-2/+17
| | | | | | The get_mirror_directory() method is just convenience for the Source implementation to get it's own private mirroring base directory, which is a subdirectory of the user specified sources directory.
* Simplify exceptions a bitTristan Van Berkom2016-12-181-6/+20
| | | | | | | | | | | Instead of declaring per operation exceptions, like PreflightError and FetchError etc, just declare exceptions per domain. Replaced the former errors with SourceError for Source implementations and ElementError for element implementations. The core will be able to report errors differently depending on what they asked given plugins to do, and handle a reduced set of exceptions.
* source.py: Fleshing out initial Source plugin facing APITristan Van Berkom2016-12-151-1/+135
|
* pep8 fixes in source.pyTristan Van Berkom2016-12-101-0/+1
|
* Split up factory objects and base data model objects.Tristan Van Berkom2016-11-121-43/+0
| | | | | | | | | | | | | | Better to have a separate file for each class clearly addressing it's purpose with it's filename. Source base data model -> source.py SourceFactory -> _sourcefactory.py Element base data model -> element.py ElementFactory -> _elementfactory.py Also moved the _plugin.py to _plugincontext.py, since the object is infact _PluginContext, lets follow this rule all around for code clarity.
* Element & Source: import private _plugin.py moduleTristan Van Berkom2016-11-091-1/+1
|
* Adding base Element & Source classes.Tristan Van Berkom2016-11-081-0/+69
These currently have no API defined yet, but provide factory objects for managing plugins of their respective Source and Element implementations and instantiating Sources and Elements on demand.