diff options
author | dancer <dancer> | 2003-04-06 22:16:35 +0000 |
---|---|---|
committer | dancer <dancer> | 2003-04-06 22:16:35 +0000 |
commit | 75a5c6348610d497096f32289abeeaa46083545a (patch) | |
tree | 6c7cadd7b3d73e32760eec124957b3b90393a7e0 /pbuilder-modules | |
parent | 16355a6841056fa7fe623d79001daf369d8a3d3e (diff) | |
download | pbuilder-75a5c6348610d497096f32289abeeaa46083545a.tar pbuilder-75a5c6348610d497096f32289abeeaa46083545a.tar.gz |
0.70
Diffstat (limited to 'pbuilder-modules')
-rw-r--r-- | pbuilder-modules | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/pbuilder-modules b/pbuilder-modules index 315e069..ad833d9 100644 --- a/pbuilder-modules +++ b/pbuilder-modules @@ -65,6 +65,7 @@ pbuilder-options: --override-config --binary-arch --preserve-buildplace + --bindmounts [bind-mount-point] pdebuild-specific pbuilder-options --pbuilderroot [command to obtain root privilege for pbuilder] @@ -102,6 +103,9 @@ function umountproc () { if [ "$USEDEVFS" = "yes" ]; then umount_one "dev" fi + for mnt in $BINDMOUNTS; do + umount_one "$mnt" + done } function mountproc () { @@ -120,6 +124,11 @@ function mountproc () { mkdir -p $BUILDPLACE/dev || true mount -t devfs /dev "$BUILDPLACE/dev" fi + for mnt in $BINDMOUNTS; do + echo "-> Mounting $mnt" + mkdir -p "$BUILDPLACE/$mnt" + mount -obind "$mnt" "$BUILDPLACE/$mnt" + done } function cleanbuildplace () { @@ -129,7 +138,9 @@ function cleanbuildplace () { if [ "${INTERNAL_BUILD_UML}" != "yes" ]; then if [ -d "$BUILDPLACE" ]; then echo " -> cleaning the build env " - rm -rf "$BUILDPLACE" + find "$BUILDPLACE" \( \! -type d \) -a -xdev -print0 |xargs -0 rm -f + find "$BUILDPLACE" -type d -xdev -depth -print0 |(xargs -0 \ + rmdir || true) fi; fi } |