From: Sebastian Krzyszkowiak Date: Wed, 2 Nov 2022 18:08:07 +0000 (+0100) Subject: helpers/mount: Check for failed umounts only umounting the whole list X-Git-Tag: 1.4.0~51 X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/commitdiff_plain/4660f35884893fd69a0b1379c0af687d1e9eda66 helpers/mount: Check for failed umounts only umounting the whole list Otherwise we raise bogus RuntimeErrors on paths with multiple mount points, which may be desired - for example when using overlayfs. --- diff --git a/tools/helpers/mount.py b/tools/helpers/mount.py index fdf6477..fce1035 100644 --- a/tools/helpers/mount.py +++ b/tools/helpers/mount.py @@ -102,8 +102,10 @@ def umount_all(args, folder): """ Umount all folders, that are mounted inside a given folder. """ - for mountpoint in umount_all_list(folder): + all_list = umount_all_list(folder) + for mountpoint in all_list: tools.helpers.run.user(args, ["umount", mountpoint]) + for mountpoint in all_list: if ismount(mountpoint): raise RuntimeError("Failed to umount: " + mountpoint)