Do something with unionfs - it works
authorPaul Crowley <paul@lshift.net>
Tue, 01 Dec 2009 09:15:10 +0000
changeset 264 cd7f901d3902
child 265 6629144cf111
Do something with unionfs - it works
.hgignore
action/go
run-test
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore	Tue Dec 01 09:15:10 2009 +0000
@@ -0,0 +1,7 @@
+^build/
+syntax: glob
+
+*~
+*.pyc
+*.orig
+*.rej
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/action/go	Tue Dec 01 09:15:10 2009 +0000
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+cd action
+
+echo "It worked" > results
+
+ls -l /dev >> results
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run-test	Tue Dec 01 09:15:10 2009 +0000
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Must be root to run this
+
+set -e
+
+PRISTINE=/var/local/cache/pristine/sid
+
+TOPDIR=`pwd`
+BACKING=$TOPDIR/build/env/backing
+MOUNT=$TOPDIR/build/env/mount
+mkdir -p $BACKING $MOUNT
+
+cp -av action $BACKING
+
+unionfs-fuse -o cow $BACKING=RW:$PRISTINE=RO $MOUNT
+
+chroot $MOUNT ./action/go
+cd $TOPDIR
+
+umount $MOUNT
+
+cat $BACKING/action/results
+
+rm -rf build/env
+