-
Notifications
You must be signed in to change notification settings - Fork 48
docs: Add reference on partition/overlay env vars #1048
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Paul Mars <[email protected]>
|
@medubelko I am not entirely sure this is the right page to document the additional env vars. They are at the crossroad of both overlay and partitions features so I also thought of creating a dedicated page. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a lot of repeated content with a similar scope here, so I think it would be better if we could combine the two sections together.
Otherwise, this seems like the right place to me. I'd appreciate other opinions, though, before we make further changes. @tigarmo?
Sadly yes. We need to strike the right balance between avoiding repetition and making it clear that: the variable naming convention is slightly different, the conditions to have them set are different and the directory they reference changes based on the part handled. |
|
I think the location is fine |
| Partition/Overlay-specific output directory environment variables | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| If overlay is enabled too, additional environment variables will be created for use during step processing and execution of user-defined scriptlets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit awkward to read, as a user. Whether partitions and/or overlays are enabled is a choice of the application, so it would be weird to read this sentence in Rockcraft's docs (because overlays are always enabled). I don't have a good suggestion on how to address this without revamping the whole thing, though. This is the kind of thing that I think we could solve with the "capability-based" approach I mentioned recently
(I understand that the problem is pre-existing)
|
|
||
| If overlay is enabled too, additional environment variables will be created for use during step processing and execution of user-defined scriptlets. | ||
|
|
||
| These variable names will contain the (optional) namespace, partition name, and lifecycle step, formatted as ``CRAFT_[<namespace>_]<partition>_OVERLAY``. The values of these variables will be the directory that corresponds to that partition, step **and** part. For instance, if the defined partitions are ``default``, ``kernel``, and ``component/bar-baz``, and the provided configuration define two parts ``my-part`` and ``another-part``, the following environment variables will be created: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| These variable names will contain the (optional) namespace, partition name, and lifecycle step, formatted as ``CRAFT_[<namespace>_]<partition>_OVERLAY``. The values of these variables will be the directory that corresponds to that partition, step **and** part. For instance, if the defined partitions are ``default``, ``kernel``, and ``component/bar-baz``, and the provided configuration define two parts ``my-part`` and ``another-part``, the following environment variables will be created: | |
| These variable names will contain the (optional) namespace, partition name, and lifecycle step, formatted as ``CRAFT_[<namespace>_]<partition>_OVERLAY``. The values of these variables will be the directory that corresponds to that partition, step **and** part. For instance, if the defined partitions are ``default``, ``kernel``, and ``component/bar-baz``, and the provided configuration defines two parts ``my-part`` and ``another-part``, the following environment variables will be created: |
(this is a really long line)
medubelko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/reference/changelog.rst)?