Skip to content

Commit 18c940d

Browse files
fmoessbauerjan-kiszka
authored andcommitted
docs: document rules for provided directories
Having overlapping kas dirs (via the env vars KAS_<x>_DIR) creates trouble regarding file permissions and cleaning. This was never really supported, but it was also not explicitly forbidden. We now state that all passed directories must be non-overlapping, except if stated otherwise. Using sub-dirs of the KAS_WORK_DIR is allowed, as this is a common use-case. We further state which directories must exist, which parent dirs must exist and which are created recursively. No functional change. Signed-off-by: Felix Moessbauer <[email protected]> Signed-off-by: Jan Kiszka <[email protected]>
1 parent afec642 commit 18c940d

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

docs/command-line/environment-variables.inc

+12-5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ kas uses a number of environment variables to configure its behavior.
22
The `Variables Glossary`_ provides an overview, wherein the tuple (C,K,E)
33
denotes the scope of the variable.
44

5+
All directories that are passed to kas by setting the corresponding
6+
environment variables (e.g. ``KAS_WORK_DIR``, ``KAS_BUILD_DIR``, ...) must
7+
not overlap with each other, except for overlapping with ``KAS_WORK_DIR``
8+
(i.e. the build|sstate|downloads|repo-ref dirs can be below the work dir).
9+
510
Variable Scope
611
~~~~~~~~~~~~~~
712

@@ -36,10 +41,12 @@ Variables Glossary
3641
| Environment variables | Description |
3742
+==========================+==================================================+
3843
| ``KAS_WORK_DIR`` | The path of the kas work directory, current work |
39-
| (C, K) | directory is the default. |
44+
| (C, K) | directory is the default. This directory must |
45+
| | exist if set. |
4046
+--------------------------+--------------------------------------------------+
4147
| ``KAS_BUILD_DIR`` | The path of the build directory, |
4248
| (C, K) | ``${KAS_WORK_DIR}/build`` is the default. |
49+
| | The parent directory must exist if set. |
4350
+--------------------------+--------------------------------------------------+
4451
| ``KAS_REPO_REF_DIR`` | The path to the repository reference directory. |
4552
| (C, K) | Repositories in this directory are used as |
@@ -54,7 +61,7 @@ Variables Glossary
5461
| | below this directory. Multiple instances of kas |
5562
| | can simultaneously work on the same directory, |
5663
| | as long as the underlying filesystem is POSIX |
57-
| | compatible. |
64+
| | compatible. This directory must exist if set. |
5865
+--------------------------+--------------------------------------------------+
5966
| ``KAS_DISTRO`` | This overwrites the respective setting in the |
6067
| ``KAS_MACHINE`` | configuration file. |
@@ -97,9 +104,9 @@ Variables Glossary
97104
| | ``SSH_PRIVATE_KEY_FILE``). |
98105
+--------------------------+--------------------------------------------------+
99106
| ``DL_DIR`` | Environment variables that are transferred to |
100-
| ``SSTATE_DIR`` | the bitbake environment. |
101-
| ``SSTATE_MIRRORS`` | |
102-
| (C,K,E) | |
107+
| ``SSTATE_DIR`` | the bitbake environment. The ``DL_DIR`` and |
108+
| ``SSTATE_MIRRORS`` | ``SSTATE_DIR`` directories are created along |
109+
| (C,K,E) | with their parents, if set. |
103110
+--------------------------+--------------------------------------------------+
104111
| ``TMPDIR`` (K,E) | Directory for temporary files. |
105112
+--------------------------+--------------------------------------------------+

docs/userguide/kas-container-description.inc

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
The ``kas-container`` script is a wrapper to run `kas` inside a build container.
22
It gives fine grained control over the data that is mapped into the build and
3-
decouples the build environment from the host system. The wrapper also takes care of
4-
mounting the necessary directories and setting up the environment variables.
3+
decouples the build environment from the host system. For details, see
4+
:ref:`env-vars-label`. The wrapper also takes care of mounting the necessary
5+
directories and setting up the environment variables inside the container.
56

67
.. note::
78
The ``kas-container`` script has limited support for Git worktrees. Regular

0 commit comments

Comments
 (0)