summaryrefslogtreecommitdiff
path: root/buildstream/utils.py
Commit message (Collapse)AuthorAgeFilesLines
* utils.py: More robust stagingTristan Van Berkom2017-01-181-11/+22
| | | | Handle overlaps a bit more violently but report about it.
* utils.py: Removed unused _format_duration()Tristan Van Berkom2017-01-131-8/+0
|
* utils.py: Added _format_duration() utilityTristan Van Berkom2017-01-121-0/+8
|
* utils.py: Removed the ordered option from _node_sanitize()Tristan Van Berkom2017-01-101-14/+13
| | | | Turns out every desired output of this is ordered at the moment.
* utils.py: _ordered_copy -> _node_santize()Tristan Van Berkom2017-01-101-8/+14
| | | | | Now by default strips away provenance but also optionally sorts it into a recursively ordered thingy.
* utils.py: Added private _generate_key() helperTristan Van Berkom2017-01-091-0/+43
| | | | | | This sorts dictionaries in the input recursively so that elements dont have to care too much about how they return stuff from plugin.get_unique_key()
* utils.py: Remove node parsing utilitiesTristan Van Berkom2017-01-071-82/+0
| | | | These are all now handled by the Plugin class
* utils.py: Fixed broken node_get_list_element() functionTristan Van Berkom2016-12-311-1/+1
|
* Added missing function from ported ybd copy/link toolsTristan Van Berkom2016-12-281-1/+47
|
* utils.py: Added utility url_directory_name()Tristan Van Berkom2016-12-191-0/+18
| | | | | | Used to create mirror directories for sources, these use fully qualified urls because a user may have multiple projects and we want to be damn sure they dont overlap.
* utils.py: Use OSError instead of IOError for nowTristan Van Berkom2016-12-181-4/+3
| | | | Since python 3.3 IOError (among a few others) are just aliases for OSError.
* utils.py: Added get_host_tool() utilityTristan Van Berkom2016-12-171-0/+22
| | | | | This is useful for plugins to assert presence of host tools so it should be publicly available
* utils.py: Added file handling utilitiesTristan Van Berkom2016-12-151-0/+186
| | | | | | | | o list_relative_paths() reports a sorted list of relative filenames o safe_copy() copy a file, unlinking the destination if it exists o safe_link() tries to create a hardlink but falls back to a copy o copy_files() copies files from one directory to another o link_files() links files from one directory to another, or falls back to copy
* utils.py: Added convenience function to iterate over YAML loaded dictTristan Van Berkom2016-12-141-0/+21
|
* Adding public utility functions for fetching yaml node valuesTristan Van Berkom2016-12-131-0/+82
| | | | | Needed by both Element and Source implementations, but let's not give them the whole _yaml API.
* Removed utils.py and created _yaml.py moduleTristan Van Berkom2016-11-281-77/+0
| | | | | | | The _yaml module has everything we need for parsing and validating loaded roundtrip yaml. This includes the dictionary compositing algorithm and also some provenance tracking to tell whence a node, member or list element was loaded from.
* utils.py: Docstring fixupTristan Van Berkom2016-11-151-7/+7
|
* Moved YAML dictionary loading to utils.pyTristan Van Berkom2016-11-151-0/+27
| | | | And renamed ContextError exception to a more general LoadError.
* Adding utils.pyTristan Van Berkom2016-11-141-0/+50
Utility box, now with method for recursively overriding dictionary values. We use this to load user config overrides but will also be using it for overriding defaults of elements from yaml