Merge "Add a pre-finalise.d phase"

This commit is contained in:
Zuul 2018-10-15 06:01:48 +00:00 committed by Gerrit Code Review
commit 8add0cb398
3 changed files with 19 additions and 0 deletions

View File

@ -486,6 +486,7 @@ sudo cp -ra ${TMP_BUILD_DIR}/built/* $TMP_BUILD_DIR/mnt
sudo rm -fr ${TMP_BUILD_DIR}/built/*
mount_proc_dev_sys
run_d pre-finalise
run_d_in_target finalise
finalise_base

View File

@ -137,6 +137,16 @@ The phases are:
* outputs: ``$IMAGE_BLOCK_DEVICE={path}``
``pre-finalise.d``
Final tuning of the root filesystem, outside the chroot. Filesystem
content has been copied into the final file system which is rooted
at ``$TMP_BUILD_DIR/mnt``. You might do things like re-mount a
cache directory that was used during the build in this phase (with
subsequent unmount in ``cleanup.d``).
* runs: **outside chroot**
``finalise.d``
Perform final tuning of the root filesystem. Runs in a chroot after the root
filesystem content has been copied into the mounted filesystem: this is an

View File

@ -0,0 +1,8 @@
---
features:
- |
A ``pre-finalise`` stage is added that runs outside the chroot and
before the ``finalise`` stage. For example, this may be useful
for mounting external resources that are used inside the chroot
during the ``finalise`` stage, but do not need to be distributed
in the final image such as build-time caches.