summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--documentation/ref-manual/classes.rst17
-rw-r--r--documentation/ref-manual/variables.rst35
2 files changed, 52 insertions, 0 deletions
diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
index 46d77d0e55..9f6e427253 100644
--- a/documentation/ref-manual/classes.rst
+++ b/documentation/ref-manual/classes.rst
@@ -2728,6 +2728,23 @@ commit, and log. From the information, report files using a JSON format
2728are created and stored in 2728are created and stored in
2729``${``\ :term:`LOG_DIR`\ ``}/error-report``. 2729``${``\ :term:`LOG_DIR`\ ``}/error-report``.
2730 2730
2731.. _ref-classes-retain:
2732
2733``retain``
2734==========
2735
2736The :ref:`ref-classes-retain` class can be used to create a tarball of the work
2737directory for a recipe when one of its tasks fails, or any other nominated
2738directories. It is useful in cases where the environment in which builds are run
2739is ephemeral or otherwise inaccessible for examination during debugging.
2740
2741To enable, add the following to your configuration::
2742
2743 INHERIT += "retain"
2744
2745The class can be disabled for specific recipes using the :term:`RETAIN_ENABLED`
2746variable.
2747
2731.. _ref-classes-rm-work: 2748.. _ref-classes-rm-work:
2732 2749
2733``rm_work`` 2750``rm_work``
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index dd97a63c0d..853e50cf9f 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -7137,6 +7137,41 @@ system and gives an overview of their function and contents.
7137 If both :term:`REQUIRED_VERSION` and :term:`PREFERRED_VERSION` are set 7137 If both :term:`REQUIRED_VERSION` and :term:`PREFERRED_VERSION` are set
7138 for the same recipe, the :term:`REQUIRED_VERSION` value applies. 7138 for the same recipe, the :term:`REQUIRED_VERSION` value applies.
7139 7139
7140 :term:`RETAIN_DIRS_ALWAYS`
7141 When inheriting the :ref:`ref-classes-retain` class, this variable holds
7142 space-separated recipe-specific directories to always save in a tarball
7143 whether the recipe build has failed or not.
7144
7145 :term:`RETAIN_DIRS_FAILURE`
7146 When inheriting the :ref:`ref-classes-retain` class, this variable holds
7147 space-separated recipe-specific directories to save in a tarball on
7148 failure of the recipe's build.
7149
7150 :term:`RETAIN_DIRS_GLOBAL_ALWAYS`
7151 When inheriting the :ref:`ref-classes-retain` class, this variable holds
7152 space-separated directories that are not specific to a recipe to save in a
7153 tarball whether the build has failed or not.
7154
7155 :term:`RETAIN_DIRS_GLOBAL_FAILURE`
7156 When inheriting the :ref:`ref-classes-retain` class, this variable holds
7157 space-separated directories that are not specific to a recipe to save in a
7158 tarball on build failure.
7159
7160 :term:`RETAIN_ENABLED`
7161 Disables the creation of a tarball of the work directory done by the
7162 :ref:`ref-classes-retain` class. Can be set to specific recipes to disable
7163 the class when the class was inherited globally with :term:`INHERIT`.
7164
7165 :term:`RETAIN_OUTDIR`
7166 When inheriting the :ref:`ref-classes-retain` class, this variable
7167 specifies the directory where to save the tarball of the work directory.
7168 The default directory is ``${TMPDIR}/retain``.
7169
7170 :term:`RETAIN_TARBALL_SUFFIX`
7171 When inheriting the :ref:`ref-classes-retain` class, this variable
7172 specifies the suffix of the tarball of the work directory. The default
7173 suffix is ``${DATETIME}.tar.gz``.
7174
7140 :term:`RM_WORK_EXCLUDE` 7175 :term:`RM_WORK_EXCLUDE`
7141 With :ref:`ref-classes-rm-work` enabled, this variable 7176 With :ref:`ref-classes-rm-work` enabled, this variable
7142 specifies a list of recipes whose work directories should not be removed. 7177 specifies a list of recipes whose work directories should not be removed.