summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2011-11-01 14:17:57 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2011-11-01 14:17:57 +0000
commit23b603aede1dd86cf699dd0f7cd43aae51adc870 (patch)
tree910c407ae55eba047e4ca1520ba6a4ca46da39eb
parentc8e5e422553fec66b223e8f03ebadf96e7a3bdcf (diff)
downloadmorph-23b603aede1dd86cf699dd0f7cd43aae51adc870.tar.gz
Add max-jobs into chunk morphologies
This lets a morphology specify that a particular chunk should be run without parallel building. Some projects have build systems that can't handle parallel building. The default is, of course, to assume that all projects can handle it. Projects whose build systems do not allow parallel building are buggy, but we have to accomodate them, but we won't be making that the default assumption. This way we gently nudge upstreams to not use broken build systems.
-rw-r--r--morphlib/builder.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/morphlib/builder.py b/morphlib/builder.py
index 481e4600..949b9fb6 100644
--- a/morphlib/builder.py
+++ b/morphlib/builder.py
@@ -65,7 +65,9 @@ class Builder(object):
self.ex.env['WORKAREA'] = self.tempdir.dirname
self.ex.env['DESTDIR'] = self._inst + '/'
- if self.settings['max-jobs']:
+ if 'max-jobs' in morph:
+ max_jobs = int(morph['max-jobs'])
+ elif self.settings['max-jobs']:
max_jobs = self.settings['max-jobs']
else:
max_jobs = morphlib.util.make_concurrency()