Skip to content

Commit

Permalink
base: lmp: sota_var_cleanup: use the ostree_rmdir_helper
Browse files Browse the repository at this point in the history
It will help removing directories with content inside without failing.

Signed-off-by: Jose Quaresma <[email protected]>
  • Loading branch information
quaresmajose committed May 17, 2023
1 parent 11d940b commit 5c861ed
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions meta-lmp-base/classes/lmp.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@ sota_var_cleanup() {
if ${@bb.utils.contains('IMAGE_FSTYPES', 'ota-ext4', 'true', 'false', d)}; then
# Remove /var stuff (ignored by ostree)
cd ${IMAGE_ROOTFS}/var
rmdir -v backups spool local lib/misc
rmdir -v volatile ${@'' if oe.types.boolean('${VOLATILE_LOG_DIR}') else 'log'}
ostree_rmdir_helper backups
ostree_rmdir_helper spool
ostree_rmdir_helper local
ostree_rmdir_helper lib/misc
ostree_rmdir_helper volatile
if not oe.types.boolean('${VOLATILE_LOG_DIR}'):
ostree_rmdir_helper log
# symlinks
rm -v run lock tmp ${@'log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''}
cd -
Expand Down

0 comments on commit 5c861ed

Please sign in to comment.