Skip to content

Commit

Permalink
base: lmp: cleanup the home/root as it is not preserved by ostree
Browse files Browse the repository at this point in the history
This will fix the remaining warning:
| WARNING: lmp-base-console-image-1.0-r0 do_image_ostree: Data in 'home' directory is not preserved by OSTree. Consider moving it under '/usr'
| home/root

Signed-off-by: Jose Quaresma <[email protected]>
  • Loading branch information
quaresmajose committed Feb 8, 2024
1 parent 7be114f commit c427321
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions meta-lmp-base/classes/lmp.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ include conf/machine/include/lmp-partner-custom.inc
include conf/machine/include/lmp-factory-custom.inc

# Rootfs cleanup as a rootfs post process hook, before ostree
sota_var_cleanup() {
sota_ostree_cleanup() {
if ${@bb.utils.contains('IMAGE_FSTYPES', 'ota-ext4', 'true', 'false', d)}; then
# Remove /home stuff (ignored by ostree)
cd ${IMAGE_ROOTFS}/home
ostree_rmdir_helper root
cd -
# Remove /var stuff (ignored by ostree)
cd ${IMAGE_ROOTFS}/var
ostree_rmdir_helper backups
Expand All @@ -32,7 +36,7 @@ sota_var_cleanup() {
cd -
fi
}
ROOTFS_POSTPROCESS_COMMAND:append:sota = " sota_var_cleanup; "
ROOTFS_POSTPROCESS_COMMAND:append:sota = " sota_ostree_cleanup; "

provision_root_meta () {
if [ -n "${SOTA_TUF_ROOT_FETCHER}" ]; then
Expand Down

0 comments on commit c427321

Please sign in to comment.