chroot: mount: skip mounted targets (MR 2252)

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-06-09 07:58:17 +02:00 committed by Oliver Smith
parent b447c20545
commit 759fdd655b
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -95,8 +95,8 @@ def mount(chroot: Chroot):
# Mount if necessary
for source, target in mountpoints.items():
target_outer = chroot / target
#raise RuntimeError("test")
pmb.helpers.mount.bind(source, target_outer)
if not pmb.helpers.mount.ismount(target_outer):
pmb.helpers.mount.bind(source, target_outer)
def mount_native_into_foreign(chroot: Chroot):