Commit 38dc2dda authored by Jonathan Maw's avatar Jonathan Maw

element.py: Add _get_source_element() method

parent 8316a1fe
......@@ -1850,6 +1850,18 @@ class Element(Plugin):
for dep in self.dependencies(Scope.ALL):
dep._set_log_handle(logfile, False)
# Returns the element whose sources this element is ultimately derived from.
#
# This is intended for being used to redirect commands that operate on an
# element to the element whose sources it is ultimately derived from.
#
# For example, element A is a build element depending on source foo,
# element B is a filter element that depends on element A. The source
# element of B is A, since B depends on A, and A has sources.
#
def _get_source_element(self):
return self
#############################################################
# Private Local Methods #
#############################################################
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment