summaryrefslogtreecommitdiff
path: root/morphlib/builder2.py
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2012-06-19 15:34:55 +0100
committerRichard Maw <richard.maw@codethink.co.uk>2012-06-20 14:40:01 +0100
commitf978d80d138a916b2287cb5b42cf7f72a182f775 (patch)
tree75ba58a5beb3b8e495d5681eca5e6bf49c457a4b /morphlib/builder2.py
parentd4dbc27700b82d87894446027dd2d4f272ef3a05 (diff)
downloadmorph-f978d80d138a916b2287cb5b42cf7f72a182f775.tar.gz
app: rename setup_proc to setup_mounts
This change is purely cosmetic, but reflects the fact that we need to mount more than just proc sometimes.
Diffstat (limited to 'morphlib/builder2.py')
-rw-r--r--morphlib/builder2.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/morphlib/builder2.py b/morphlib/builder2.py
index e534168d..f9c2e894 100644
--- a/morphlib/builder2.py
+++ b/morphlib/builder2.py
@@ -136,7 +136,7 @@ class BuilderBase(object):
def __init__(self, app, staging_area, local_artifact_cache,
remote_artifact_cache, artifact, repo_cache,
- build_env, max_jobs, setup_proc):
+ build_env, max_jobs, setup_mounts):
self.app = app
self.staging_area = staging_area
self.local_artifact_cache = local_artifact_cache
@@ -146,7 +146,7 @@ class BuilderBase(object):
self.build_env = build_env
self.max_jobs = max_jobs
self.build_watch = morphlib.stopwatch.Stopwatch()
- self.setup_proc = setup_proc
+ self.setup_mounts = setup_mounts
def save_build_times(self):
'''Write the times captured by the stopwatch'''
@@ -262,7 +262,7 @@ class ChunkBuilder(BuilderBase):
def mount_proc(self): # pragma: no cover
logging.debug('Mounting /proc in staging area')
path = os.path.join(self.staging_area.dirname, 'proc')
- if os.path.exists(path) and self.setup_proc:
+ if os.path.exists(path) and self.setup_mounts:
self.app.runcmd(['mount', '-t', 'proc', 'none', path])
return path
else:
@@ -271,7 +271,7 @@ class ChunkBuilder(BuilderBase):
return None
def umount_proc(self, mounted): # pragma: no cover
- if (mounted and self.setup_proc and mounted and
+ if (mounted and self.setup_mounts and mounted and
os.path.exists(os.path.join(mounted, 'self'))):
logging.error('Unmounting /proc in staging area: %s' % mounted)
morphlib.fsutils.unmount(self.app.runcmd, mounted)
@@ -645,7 +645,7 @@ class Builder(object): # pragma: no cover
def __init__(self, app, staging_area, local_artifact_cache,
remote_artifact_cache, repo_cache, build_env, max_jobs,
- setup_proc):
+ setup_mounts):
self.app = app
self.staging_area = staging_area
self.local_artifact_cache = local_artifact_cache
@@ -653,7 +653,7 @@ class Builder(object): # pragma: no cover
self.repo_cache = repo_cache
self.build_env = build_env
self.max_jobs = max_jobs
- self.setup_proc = setup_proc
+ self.setup_mounts = setup_mounts
def build_and_cache(self, artifact):
kind = artifact.source.morphology['kind']
@@ -661,7 +661,7 @@ class Builder(object): # pragma: no cover
self.local_artifact_cache,
self.remote_artifact_cache, artifact,
self.repo_cache, self.build_env,
- self.max_jobs, self.setup_proc)
+ self.max_jobs, self.setup_mounts)
logging.debug('Builder.build: artifact %s with %s' %
(artifact.name, repr(o)))
built_artifacts = o.build_and_cache()