summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2014-12-12 11:05:31 (GMT)
committerRichard Maw <richard.maw@codethink.co.uk>2014-12-12 11:39:47 (GMT)
commit11555718e14ab147bd5da8b093d49279ad9d3ee8 (patch)
treef0fcee5da23d2ea44bc799b9535e1dfda35f728a
parent1bed7a3732e7d6158613609a57fb1f77ec99de1e (diff)
downloadmorph-baserock/richardmaw/bugfix/stagingarea-mounts-inside-destdir-v2.tar.gz
-rw-r--r--morphlib/stagingarea.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/morphlib/stagingarea.py b/morphlib/stagingarea.py
index b676d4d..5810bf3 100644
--- a/morphlib/stagingarea.py
+++ b/morphlib/stagingarea.py
@@ -274,9 +274,14 @@ class StagingArea(object):
else:
binds = ()
+ if self.use_chroot:
+ mounts = self.to_mount
+ else:
+ mounts = [(os.path.join(self.dirname, target), type, source)
+ for target, type, source in self.to_mount]
cmdline = morphlib.util.containerised_cmdline(
argv, cwd=kwargs.pop('cwd', '/'),
- root=chroot_dir, mounts=self.to_mount,
+ root=chroot_dir, mounts=mounts,
binds=binds, mount_proc=mount_proc,
writable_paths=do_not_mount_dirs)
try: