summaryrefslogtreecommitdiff
path: root/buildstream/plugins/elements
diff options
context:
space:
mode:
authorJonathan Maw <jonathan.maw@codethink.co.uk>2018-03-02 13:57:40 +0000
committerJonathan Maw <jonathan.maw@codethink.co.uk>2018-03-20 13:18:00 +0000
commite8e88e5c746e391da49b3eecba13414a11e55084 (patch)
tree8a8e87f0bbf7c5ce61dc6316f277af4b29006b1f /buildstream/plugins/elements
parenta3cb8199f2bbf3642efcba18cc7c8430e40a7e2a (diff)
downloadbuildstream-e8e88e5c746e391da49b3eecba13414a11e55084.tar.gz
filter: Reword docstring to explain what the element does278-filter-documentation-could-be-better
The docstring included instructions on what it *should* be used for, which is unnecessary. Further, it was vague on what the element actually did. The new docstring should be more explicit on what it does.
Diffstat (limited to 'buildstream/plugins/elements')
-rw-r--r--buildstream/plugins/elements/filter.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/buildstream/plugins/elements/filter.py b/buildstream/plugins/elements/filter.py
index 672b801ce..2487a9799 100644
--- a/buildstream/plugins/elements/filter.py
+++ b/buildstream/plugins/elements/filter.py
@@ -20,16 +20,17 @@
"""Filter element
-This element copies a subset of the files in its dependencies.
+This filters another element by producing an output that is a subset of
+the filtered element.
-This is normally used to separate out the contents of an artifact
-into multiple artifacts and define separate sets of dependencies,
-in cases where a build produces multiple discrete "packages",
-e.g. systemd and udev; gettext and libintl.
+To specify the element to filter, specify it as the one and only build
+dependency to filter. See :ref:`Dependencies <format_dependencies>`
+for what dependencies are and how to specify them.
-This element expects precisely one build dependency, and multiple
-runtime dependencies that are not the element that was the build
-dependency.
+Dependencies aside from the filtered element may be specified, but
+they must be runtime dependencies only. This can be useful to propagate
+runtime dependencies forward from this filter element onto its reverse
+dependencies.
The default configuration and possible options are as such:
.. literalinclude:: ../../../buildstream/plugins/elements/filter.yaml