public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Subject: [PATCH] dpkg-base: Wait for umount to succeed
Date: Mon, 16 Sep 2019 10:19:11 +0200	[thread overview]
Message-ID: <72e5be29-1137-f829-40ed-a911c26c60f9@siemens.com> (raw)

From: Jan Kiszka <jan.kiszka@siemens.com>

Rather than ignoring a still busy BUILDROOT mount point, wait for it to
become free. If that should ever get stuck, the user can still forcibly
terminate. But normally, this is just about giving some detached
processes time to finish.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta/classes/dpkg-base.bbclass | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index 4c6e02a..c86d0b3 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -77,8 +77,10 @@ dpkg_do_mounts() {
 }
 
 dpkg_undo_mounts() {
-    sudo umount ${BUILDROOT} 2>/dev/null || true
-    sudo rmdir ${BUILDROOT} 2>/dev/null || true
+    while ! sudo umount ${BUILDROOT} 2>/dev/null; do
+        sleep 0.1
+    done
+    sudo rmdir ${BUILDROOT}
 }
 
 # Placeholder for actual dpkg_runbuild() implementation
-- 
2.16.4

                 reply	other threads:[~2019-09-16  8:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=72e5be29-1137-f829-40ed-a911c26c60f9@siemens.com \
    --to=jan.kiszka@siemens.com \
    --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