diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-03-18 15:32:38 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-03-18 15:32:38 +0900 |
commit | da394300561d4fd65eb238152f1ced15d2a41dbe (patch) | |
tree | de221838d072db74ba0cef954c4b03376bc3f3b9 /buildstream/source.py | |
parent | 0d55bd32641eda6c3a99a5774f98b829fb5a0e6c (diff) | |
download | buildstream-da394300561d4fd65eb238152f1ced15d2a41dbe.tar.gz |
Refactor: Untangling element/source names
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
Diffstat (limited to 'buildstream/source.py')
-rw-r--r-- | buildstream/source.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/buildstream/source.py b/buildstream/source.py index 5c7c27253..fb4c9d95a 100644 --- a/buildstream/source.py +++ b/buildstream/source.py @@ -56,9 +56,9 @@ class Source(Plugin): All Sources derive from this class, this interface defines how the core will be interacting with Sources. """ - def __init__(self, display_name, context, project, meta): + def __init__(self, context, project, meta): provenance = _yaml.node_get_provenance(meta.config) - super().__init__(display_name, context, project, provenance, "source") + super().__init__(meta.name, context, project, provenance, "source") self.__directory = meta.directory # Staging relative directory self.__origin_node = meta.origin_node # YAML node this Source was loaded from |