public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Baurzhan Ismagulov <ibr@radix50.net>
To: isar-users@googlegroups.com
Subject: [PATCH v2] dpkg-base: Warn about unmounting problems
Date: Wed,  2 Oct 2019 12:56:20 +0200	[thread overview]
Message-ID: <20191002105620.2823-1-ibr@radix50.net> (raw)

From: Baurzhan Ismagulov <ibr@ilbers.de>

If a problem occurs, log umount's error messages. Wait for the processes to
terminate and retry. If that doesn't help, warn the user about retrying
every 10 s to avoid clobbering CI logs.

Signed-off-by: Baurzhan Ismagulov <ibr@ilbers.de>
---
Changes in v2:
- Warn after some time.

 meta/classes/dpkg-base.bbclass | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index 2e8a0d1..006d8b1 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -1,5 +1,6 @@
 # This software is a part of ISAR.
 # Copyright (C) 2017-2019 Siemens AG
+# Copyright (C) 2019 ilbers GmbH
 #
 # SPDX-License-Identifier: MIT
 
@@ -78,8 +79,14 @@ dpkg_do_mounts() {
 }
 
 dpkg_undo_mounts() {
-    while ! sudo umount ${BUILDROOT} 2>/dev/null; do
+    i=1
+    while ! sudo umount ${BUILDROOT}; do
         sleep 0.1
+        i=`expr $i + 1`
+        if [ $i -gt 100 ]; then
+            bbwarn "${BUILDROOT}: Couldn't unmount, retrying..."
+            i=1
+        fi
     done
     sudo rmdir ${BUILDROOT}
 }
-- 
2.20.1


             reply	other threads:[~2019-10-02 10:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-02 10:56 Baurzhan Ismagulov [this message]
2019-10-04  7:31 ` Jan Kiszka
2019-10-07 15:49   ` Baurzhan Ismagulov

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=20191002105620.2823-1-ibr@radix50.net \
    --to=ibr@radix50.net \
    --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