public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Anton Mikanovich <amikan@ilbers.de>
To: isar-users@googlegroups.com
Cc: Anton Mikanovich <amikan@ilbers.de>
Subject: [PATCH v2 4/5] wic: Unmount dirs after usage
Date: Wed, 21 Apr 2021 17:58:54 +0300	[thread overview]
Message-ID: <20210421145855.66257-5-amikan@ilbers.de> (raw)
In-Reply-To: <20210421145855.66257-1-amikan@ilbers.de>

Unmount dirs mounted at generate_wic_image task after usage.

Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
 meta/classes/wic-img.bbclass | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/meta/classes/wic-img.bbclass b/meta/classes/wic-img.bbclass
index 01baf89..a293fd3 100644
--- a/meta/classes/wic-img.bbclass
+++ b/meta/classes/wic-img.bbclass
@@ -200,5 +200,14 @@ EOSUDO
     done
     rm -rf ${BUILDCHROOT_DIR}/${WICTMP}
     rm -rf ${IMAGE_ROOTFS}/../pseudo
+    sudo -s <<'EOSUDO'
+        ( flock 9
+        for dir in ${BBLAYERS} ${STAGING_DIR} ${SCRIPTSDIR} ${BITBAKEDIR}; do
+            if mountpoint -q ${BUILDCHROOT_DIR}/$dir; then
+                umount ${BUILDCHROOT_DIR}/$dir
+            fi
+        done
+        ) 9>${MOUNT_LOCKFILE}
+EOSUDO
     buildchroot_undo_mounts
 }
-- 
2.25.1


  parent reply	other threads:[~2021-04-21 14:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21 14:58 [PATCH v2 0/5] isar: Rebuild mount logic Anton Mikanovich
2021-04-21 14:58 ` [PATCH v2 1/5] dpkg: Make mount buildroot reliable Anton Mikanovich
2021-04-21 14:58 ` [PATCH v2 2/5] buildchroot: Unmount buildchroot if not needed Anton Mikanovich
2021-04-21 14:58 ` [PATCH v2 3/5] rootfs: Unmount rootfs mounts " Anton Mikanovich
2021-08-12  5:39   ` Jan Kiszka
2021-08-12  9:09     ` Anton Mikanovich
2021-08-12  9:25       ` Jan Kiszka
2021-08-13 16:27         ` Anton Mikanovich
2021-08-15 19:05           ` Jan Kiszka
2021-04-21 14:58 ` Anton Mikanovich [this message]
2021-04-21 14:58 ` [PATCH v2 5/5] events: Warn if mounted paths left Anton Mikanovich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210421145855.66257-5-amikan@ilbers.de \
    --to=amikan@ilbers.de \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox