diff mbox series

ref-manual: document RM_WORK_EXCLUDE_ITEMS variable

Message ID e464f1c3-2d29-4a9d-a46f-8e4cb217f17b@crashcourse.ca
State New
Headers show
Series ref-manual: document RM_WORK_EXCLUDE_ITEMS variable | expand

Commit Message

Robert P. J. Day June 16, 2026, 1:50 p.m. UTC
Add an explanation of the RM_WORK_EXCLUDE_ITEMS variable to both the
Reference Manual variables and classes sections.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>

---

Comments

Antonin Godard June 16, 2026, 3:07 p.m. UTC | #1
On Tue Jun 16, 2026 at 3:50 PM CEST, Robert P. J. Day wrote:
>
> Add an explanation of the RM_WORK_EXCLUDE_ITEMS variable to both the
> Reference Manual variables and classes sections.
>
> Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
>
> ---
>
> diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
> index 95e07f85a..ba87a5cd4 100644
> --- a/documentation/ref-manual/classes.rst
> +++ b/documentation/ref-manual/classes.rst
> @@ -2614,6 +2614,13 @@ which can also be set in your ``local.conf`` file. Here is an example::
>
>     RM_WORK_EXCLUDE += "busybox glibc"
>
> +Finally, if you are using this class for a recipe but want to prevent
> +:term:`BitBake` from deleting specific folders or files in that recipe's
> +:term:`WORKDIR` (other than ``temp``), you can preserve those folders or
> +files with the :term:`RM_WORK_EXCLUDE_ITEMS` variable as follows::
> +
> +   RM_WORK_EXCLUDE_ITEMS += "items_to_keep"
> +
>  .. _ref-classes-rootfs*:
>
>  ``rootfs*``
> diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
> index df3666f1c..c74de2be8 100644
> --- a/documentation/ref-manual/variables.rst
> +++ b/documentation/ref-manual/variables.rst
> @@ -8433,6 +8433,11 @@ system and gives an overview of their function and contents.
>        specifies a list of recipes whose work directories should not be removed.
>        See the ":ref:`ref-classes-rm-work`" section for more details.
>
> +   :term:`RM_WORK_EXCLUDE_ITEMS`
> +      With :ref:`ref-classes-rm-work` enabled, this variable specifies
> +      a list of files or folders to be preserved.
> +      See the ":ref:`ref-classes-rm-work`" section for more details.

Can you also mention that these files or directories are relative to the WORKDIR?

Thanks,
Antonin
diff mbox series

Patch

diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
index 95e07f85a..ba87a5cd4 100644
--- a/documentation/ref-manual/classes.rst
+++ b/documentation/ref-manual/classes.rst
@@ -2614,6 +2614,13 @@  which can also be set in your ``local.conf`` file. Here is an example::

    RM_WORK_EXCLUDE += "busybox glibc"

+Finally, if you are using this class for a recipe but want to prevent
+:term:`BitBake` from deleting specific folders or files in that recipe's
+:term:`WORKDIR` (other than ``temp``), you can preserve those folders or
+files with the :term:`RM_WORK_EXCLUDE_ITEMS` variable as follows::
+
+   RM_WORK_EXCLUDE_ITEMS += "items_to_keep"
+
 .. _ref-classes-rootfs*:

 ``rootfs*``
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index df3666f1c..c74de2be8 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -8433,6 +8433,11 @@  system and gives an overview of their function and contents.
       specifies a list of recipes whose work directories should not be removed.
       See the ":ref:`ref-classes-rm-work`" section for more details.

+   :term:`RM_WORK_EXCLUDE_ITEMS`
+      With :ref:`ref-classes-rm-work` enabled, this variable specifies
+      a list of files or folders to be preserved.
+      See the ":ref:`ref-classes-rm-work`" section for more details.
+
    :term:`ROOT_HOME`
       Defines the root home directory. By default, this directory is set as
       follows in the BitBake configuration file::