]> glassweightruler.freedombox.rocks Git - waydroid.git/commitdiff
helpers/mount: Check for failed umounts only umounting the whole list
authorSebastian Krzyszkowiak <dos@dosowisko.net>
Wed, 2 Nov 2022 18:08:07 +0000 (19:08 +0100)
committerAlessandro Astone <ales.astone@gmail.com>
Thu, 12 Jan 2023 20:31:19 +0000 (21:31 +0100)
Otherwise we raise bogus RuntimeErrors on paths with multiple mount points,
which may be desired - for example when using overlayfs.

tools/helpers/mount.py

index fdf647776b3412781757c3388da26b4b6bd7063c..fce103567648072646289a045fd28548d6f0434d 100644 (file)
@@ -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)