summaryrefslogtreecommitdiff
path: root/morphlib/builder2.py
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@gmail.com>2014-10-15 18:01:55 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2014-10-24 14:31:15 +0000
commit595c92f65deb02e56414d80a7cfe8cfde508ca4d (patch)
treef9fbff53181c6347f0646106cd8574904c6911be /morphlib/builder2.py
parent11669de95de7e8a9ad8b41fa5e9be3fbb845c52e (diff)
downloadmorph-595c92f65deb02e56414d80a7cfe8cfde508ca4d.tar.gz
stagingarea: Mount proc and ccache inside the namespace
This works towards allowing multiple concurrent builds in the same system, which has the same problem as deployments. This is the easy bit, since linux-user-chroot has support for bind mounts and /proc mounts. We also need to get rid of the /dev/shm mount to be able to build in parallel though.
Diffstat (limited to 'morphlib/builder2.py')
-rw-r--r--morphlib/builder2.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/morphlib/builder2.py b/morphlib/builder2.py
index 596cd645..8615ed59 100644
--- a/morphlib/builder2.py
+++ b/morphlib/builder2.py
@@ -342,6 +342,7 @@ class ChunkBuilder(BuilderBase):
relative_builddir = self.staging_area.relative(builddir)
relative_destdir = self.staging_area.relative(destdir)
+ ccache_dir = self.staging_area.ccache_dir(self.source)
extra_env = { 'DESTDIR': relative_destdir }
steps = [
@@ -391,7 +392,8 @@ class ChunkBuilder(BuilderBase):
cwd=relative_builddir,
stdout=stdout or subprocess.PIPE,
stderr=subprocess.STDOUT,
- logfile=logfilepath)
+ logfile=logfilepath,
+ ccache_dir=ccache_dir)
if stdout:
stdout.flush()