[Buildd-tools-devel] schroot unionfs support

Tim Abbott tabbott at MIT.EDU
Sun Mar 22 20:45:26 UTC 2009


I ran into another minor problem with the unionfs branch today -- one 
couldn't access source chroots of chroots managed with LVM snapshots.  I 
believe that those are of type block-device, and we just weren't setting 
CHROOT_MOUNT_DEVICE in that case (though I don't see analogous logic in 
schroot 1.2.1, which does work, so maybe something else is wrong).  The 
patch below fixes this for me.

	-Tim Abbott

---

Set CHROOT_MOUNT_DEVICE for chroots of type block-device.

Signed-off-by: Tim Abbott <tabbott at mit.edu>
---
 bin/schroot/setup/10mount |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/bin/schroot/setup/10mount b/bin/schroot/setup/10mount
index dcfe204..94da8f2 100755
--- a/bin/schroot/setup/10mount
+++ b/bin/schroot/setup/10mount
@@ -182,6 +182,8 @@ if [ "$CHROOT_TYPE" = "plain" ] || [ "$CHROOT_TYPE" = "directory" ] || [ "$CHROO
 	CHROOT_MOUNT_OPTIONS="--bind"
 	CHROOT_MOUNT_DEVICE="$CHROOT_DIRECTORY"
 	CHROOT_FS_UNION_RO_BRANCH="$CHROOT_DIRECTORY"
+    elif [ "$CHROOT_TYPE" = "block-device" ]; then
+	CHROOT_MOUNT_DEVICE="$CHROOT_DEVICE"
     elif [ "$CHROOT_TYPE" = "lvm-snapshot" ]; then
 	CHROOT_MOUNT_DEVICE="$CHROOT_LVM_SNAPSHOT_DEVICE"
     fi
-- 
1.6.2.1



More information about the Buildd-tools-devel mailing list