Skip to content

Commit 142419e

Browse files
committed
feat(snapcraft): revole pull request comments
1 parent 6a5bf72 commit 142419e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

snapcraft/explanation/parts-lifecycle.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ When creating more advanced snaps or troubleshooting build issues, a more thorou
1818
A part goes through the following five steps:
1919

2020
1. **Pull**: downloads or otherwise retrieves the components needed to build the part.
21-
* You can use the [`source-*` keywords](/t/snapcraft-parts-metadata/8336#heading--source) of a part to specify which components to retrieve. For instance, if `source` points to a Git repository, the pull step will clone that repository.
21+
* You can use the [`source-*`](/t/snapcraft-parts-metadata/8336#heading--source) keywords of a part to specify which components to retrieve. For instance, if `source` points to a Git repository, the pull step will clone that repository.
2222
1. **Build**: constructs the part from the previously pulled components.
23-
* The [`plugin`](/t/snapcraft-plugins/4284) of a part specifies how it is constructed. The [`meson` plugin](/t/the-meson-plugin/8623), for example, executes `meson` and `ninja` to compile source code.
23+
* The [`plugin`](/t/snapcraft-plugins/4284) of a part specifies how it is constructed. The [`meson`](/t/the-meson-plugin/8623) plugin, for example, executes `meson` and `ninja` to compile source code.
2424
* Each part is built in a separate directory, but it can use the contents of the staging area if it specifies a dependency on other parts using the `after` keyword. See [Processing order and dependencies](#heading--processing-order) for more information.
25-
* During the `organize` event, last event of this step, the files generated by the build step are renamed.
25+
* To rename or move files, you can use the [`organize`](/t/snapcraft-yaml-schema/4276#p-21225-organize-79) keyword.
2626
1. **Stage**: copies the built components into the staging area.
27-
* This is the first time all the different parts that make up the snap are actually placed in the same directory. If multiple parts provide the same file with differing contents, you will get a conflict. You can avoid these conflicts by using the [`stage` keyword](/t/snapcraft-parts-metadata/8336#heading--stage) to enable or block files coming from the part. You can also use this keyword to filter out files that are not required in the snap itself, for example build files specific to a single part.
27+
* This is the first time all the different parts that make up the snap are actually placed in the same directory. If multiple parts provide the same file with differing contents, you will get a conflict. You can avoid these conflicts by using the [`stage`](/t/snapcraft-parts-metadata/8336#heading--stage) keyword to enable or block files coming from the part. You can also use this keyword to filter out files that are not required in the snap itself, for example build files specific to a single part.
2828
1. **Prime**: copies the staged components into the priming area.
2929
* This is very similar to the stage step, but files go into the priming area instead of the staging area. The `prime` step exists because the staging area might still contain files that are required for the build but not for the snap. For example, if you have a part that downloads and installs a compiler, then you stage this part so other parts can use the compiler during building. You can then use the `prime` filter keyword to make sure that it doesn't get copied to the priming area, so it's not taking up space in the snap.
30-
* During this step, if specific `permissions` were specified, they will be applied.
30+
* To apply specific permissions to files, you can use the `permissions` keyword.
3131
* Some extra checks are also run during this step to ensure that all dependencies are satisfied for a proper run time. If confinement was set to `classic`, then files will be scanned and, if needed, patched to work with this confinement mode.
3232
1. **Pack**: takes the entire contents of the `prime` directory and packs it into [a snap](/t/the-snap-format/698).
3333

@@ -78,7 +78,7 @@ See [Parts environment variables](/t/parts-environment-variables/12271) for more
7878

7979
Each plugin defines the default actions that happen during a step. This behavior can be changed in two ways:
8080
- By using `override-<step-name>` in `snapcraft.yaml`. See [Overriding steps](/t/scriptlets/4892) for more details.
81-
- By using a local plugin. This can inherit the parent plugin or scaffolding from the original. See [Local plugins](/t/writing-local-plugins/5125) for more details. Please note that using a local plugin is deprecated for base core22 and onwards. Because it hasn't been supported for recent bases, it will need a core20 to work.
81+
- By using a local plugin. This can inherit the parent plugin or scaffolding from the original. See [Local plugins](/t/writing-local-plugins/5125) for more details. Please note that using a local plugin has been deprecated in `base: core20` and fully removed in `base: core22`.
8282

8383
See [Parts environment variables](/t/parts-environment-variables/12271) for a list of part-specific environment variables that can be accessed to help build a part.
8484

@@ -88,9 +88,9 @@ By default, `snapcraft` runs the same lifecycle step of all parts before moving
8888

8989
The ordering rules are as follows:
9090
- Parts are ordered alphabetically by name.
91-
- When a part requires another part (using the ``after`` key), the required part will go through the build and stage steps before the initial part can run its build step.
91+
- When a part requires another part (using the ``after`` keyword), the required part will go through the build and stage steps before the initial part can run its build step.
9292

93-
Note that each lifecycle step depends on the completion of the previous step for that part, so to reach a desired step, all prior steps need to have successfully run. Renaming or adding parts and modifying or removing ``after`` keys can change that order.
93+
Note that each lifecycle step depends on the completion of the previous step for that part, so to reach a desired step, all prior steps need to have successfully run. Renaming or adding parts and modifying or removing ``after`` keywords can change that order.
9494

9595
<h4>Example 1 - Parts run alphabetically</h4>
9696

0 commit comments

Comments
 (0)