1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-25 21:45:11 +03:00

helpers: mount: quieter umount

Only print the root dir not all child mountpoints.

Signed-off-by: Casey Connolly <kcxt@postmarketos.org>
This commit is contained in:
Casey Connolly 2025-05-26 18:08:19 +02:00
parent 4b534bb6da
commit a707a3003d

View file

@ -101,9 +101,12 @@ def umount_all_list(prefix: Path, source: Path = Path("/proc/mounts")) -> list[P
def umount_all(folder: Path) -> None:
"""Umount all folders that are mounted inside a given folder."""
for mountpoint in umount_all_list(folder):
all_mountpoints = umount_all_list(folder)
if all_mountpoints:
pmb.logging.info(f"% umount -R {folder}")
for mountpoint in all_mountpoints:
if mountpoint.name != "binfmt_misc":
pmb.logging.info(f"% umount {mountpoint}")
sandbox.umount2(str(mountpoint), sandbox.MNT_DETACH)