* [PATCH] dpkg-base: Wait for umount to succeed
@ 2019-09-16 8:19 Jan Kiszka
0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2019-09-16 8:19 UTC (permalink / raw)
To: isar-users
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-09-16 8:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-16 8:19 [PATCH] dpkg-base: Wait for umount to succeed Jan Kiszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox