[v3,8/8] image: Do not call rootfs_do_umounts twice

Message ID 20241011100050.322686-9-amikan@ilbers.de
State Accepted, archived
Headers show
Series Hanging mount fixes | expand

Commit Message

Anton Mikanovich Oct. 11, 2024, 10 a.m. UTC
As now every rootfs_do_mounts should be followed by rootfs_do_umounts
in the same task, there is no need in calling umount inside
do_rootfs_finalize.

Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
 RECIPE-API-CHANGELOG.md    | 6 ++++++
 meta/classes/image.bbclass | 2 --
 2 files changed, 6 insertions(+), 2 deletions(-)

Patch

diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
index 608d0cc3..56ebfeb7 100644
--- a/RECIPE-API-CHANGELOG.md
+++ b/RECIPE-API-CHANGELOG.md
@@ -674,3 +674,9 @@  always outputs a warning if mounts are left behind after the build.
 Bitbake exit status depends on ISAR_FAIL_ON_CLEANUP bitbake variable:
  - 0 or unset: Output a warning, unmount, build succeeds (default).
  - 1: Output a warning, keep mounts left behind, build fails.
+
+### Stricter rootfs mounts management
+
+rootfs_do_umounts is not called from do_rootfs_finalize anymore.
+
+Every individual task that does mounting must also do the umounting at its end.
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 1eb974e8..472df3cf 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -405,8 +405,6 @@  def apt_list_files(d):
 IMAGE_LISTS = "${@ ' '.join(apt_list_files(d)) }"
 
 do_rootfs_finalize() {
-    rootfs_do_umounts
-
     sudo -s <<'EOSUDO'
         set -e