summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2016-02-15 15:27:17 +0000
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2016-02-15 15:37:28 +0000
commitefd53e3f12565f4c77575e2983a74903df6c8685 (patch)
tree1ff799a2b96b3d3a27fc649810cbece49f67f15e
parent419633884c2cdbcb827c0b43b461ffa17b5f5582 (diff)
downloadmorph-efd53e3f12565f4c77575e2983a74903df6c8685.tar.gz
Fix unused 'bs' var in builder
There's no longer any need to look up the buildsystem in builder, since the morphloader now sets commands directly in the morphology. Removing this unused variable also fixes a bug where morph can crash if the chunk being built is being built with a buildsystem that is not hardcoded in morph, error below: 2016-02-15 15:29:46 Starting build of devel-system-x86_64-generic 2016-02-15 15:29:46 [Build 70/407] [cython.morph] Building chunk cython.morph 2016-02-15 15:29:46 [Build 70/407] [cython.morph] Creating staging area 2016-02-15 15:29:47 [Build 70/407] [cython.morph] Starting actual build: cython.morph 4dd8e76 2016-02-15 15:29:47 [Build 70/407] [cython.morph] Extracting upstream:cython into /src/tmp/staging/tmpLI9TUj/cython.morph.build Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/cliapp/app.py", line 190, in _run self.process_args(args) File "/src/morph/morphlib/app.py", line 299, in process_args cliapp.Application.process_args(self, args) File "/usr/lib/python2.7/site-packages/cliapp/app.py", line 539, in process_args method(args[1:]) File "/src/morph/morphlib/plugins/build_plugin.py", line 208, in build self._build(source_pool, filename, component_names=component_names) File "/src/morph/morphlib/plugins/build_plugin.py", line 237, in _build bc.build_in_order(component) File "/src/morph/morphlib/buildcommand.py", line 297, in build_in_order self.cache_or_build_source(s, build_env) File "/src/morph/morphlib/buildcommand.py", line 317, in cache_or_build_source self.build_source(source, build_env) File "/src/morph/morphlib/buildcommand.py", line 374, in build_source self.build_and_cache(staging_area, source, setup_mounts) File "/src/morph/morphlib/buildcommand.py", line 545, in build_and_cache return builder.build_and_cache(source) File "/src/morph/morphlib/builder.py", line 748, in build_and_cache built_artifacts = o.build_and_cache() File "/src/morph/morphlib/builder.py", line 288, in build_and_cache self.run_commands(temppath, stdout) File "/src/morph/morphlib/builder.py", line 314, in run_commands bs = morphlib.buildsystem.lookup_build_system(m['build-system']) File "/src/morph/morphlib/buildsystem.py", line 300, in lookup_build_system raise KeyError('Unknown build system: %s' % name) KeyError: 'Unknown build system: python3-distutils' Change-Id: Iddf651b408c612c7c80296012cf1c97ab99e8ccc
-rw-r--r--morphlib/builder.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/morphlib/builder.py b/morphlib/builder.py
index cfd5510c..d8050637 100644
--- a/morphlib/builder.py
+++ b/morphlib/builder.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Codethink Limited
+# Copyright (C) 2012-2016 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -311,7 +311,6 @@ class ChunkBuilder(BuilderBase):
def run_commands(self, logfilepath, stdout=None): # pragma: no cover
m = self.source.morphology
- bs = morphlib.buildsystem.lookup_build_system(m['build-system'])
relative_builddir = self.staging_area.relative_builddir()
relative_destdir = self.staging_area.relative_destdir()