diff options
authorRichard Ipsum <>2016-02-15 15:27:17 (GMT)
committerRichard Ipsum <>2016-02-15 15:37:28 (GMT)
commitefd53e3f12565f4c77575e2983a74903df6c8685 (patch)
parent419633884c2cdbcb827c0b43b461ffa17b5f5582 (diff)
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/ Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/cliapp/", line 190, in _run self.process_args(args) File "/src/morph/morphlib/", line 299, in process_args cliapp.Application.process_args(self, args) File "/usr/lib/python2.7/site-packages/cliapp/", line 539, in process_args method(args[1:]) File "/src/morph/morphlib/plugins/", line 208, in build self._build(source_pool, filename, component_names=component_names) File "/src/morph/morphlib/plugins/", line 237, in _build bc.build_in_order(component) File "/src/morph/morphlib/", line 297, in build_in_order self.cache_or_build_source(s, build_env) File "/src/morph/morphlib/", line 317, in cache_or_build_source self.build_source(source, build_env) File "/src/morph/morphlib/", line 374, in build_source self.build_and_cache(staging_area, source, setup_mounts) File "/src/morph/morphlib/", line 545, in build_and_cache return builder.build_and_cache(source) File "/src/morph/morphlib/", line 748, in build_and_cache built_artifacts = o.build_and_cache() File "/src/morph/morphlib/", line 288, in build_and_cache self.run_commands(temppath, stdout) File "/src/morph/morphlib/", line 314, in run_commands bs = morphlib.buildsystem.lookup_build_system(m['build-system']) File "/src/morph/morphlib/", line 300, in lookup_build_system raise KeyError('Unknown build system: %s' % name) KeyError: 'Unknown build system: python3-distutils' Change-Id: Iddf651b408c612c7c80296012cf1c97ab99e8ccc
1 files changed, 1 insertions, 2 deletions
diff --git a/morphlib/ b/morphlib/
index cfd5510..d805063 100644
--- a/morphlib/
+++ b/morphlib/
@@ -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()