From 50cc6825d8b56d8b2c941fa99c7c15b4ca4de3f0 Mon Sep 17 00:00:00 2001 From: Andrew Gaffney Date: Sat, 28 Nov 2009 17:57:11 -0600 Subject: [PATCH] fix a few problems with the last commit --- modules/catalyst/target/__init__.py | 8 ++++---- modules/catalyst/target/generic.py | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/catalyst/target/__init__.py b/modules/catalyst/target/__init__.py index 3bb100c7..9ad8b642 100644 --- a/modules/catalyst/target/__init__.py +++ b/modules/catalyst/target/__init__.py @@ -46,10 +46,10 @@ def build_targets(): for target in buildplan: try: - target.run() + target['object'].run() except: catalyst.util.print_traceback() - catalyst.output.warn("Error encountered during run of target " + x) + catalyst.output.warn("Error encountered during run of target " + target['info']['target']) raise def build_target_buildplan(): @@ -59,7 +59,7 @@ def build_target_buildplan(): spec_values = spec.get_values() targetmap = config.get_targetmap() - built_targets = find_built_targets(spec_values['storedir'] + '/builds/') + built_targets = find_built_targets(config.get_conf()['storedir'] + '/builds/') if not "targets" in spec_values or not spec_values['targets']: raise CatalystError, "No target(s) specified." @@ -78,7 +78,7 @@ def build_target_buildplan(): targets[i]['parent'] = 'pass' continue - for x target['depends']: + for x in target['depends']: for y in built_targets: info = y.get_target_info() if info['target'] == y and info['version_stamp'] == target['info']['version_stamp'] and \ diff --git a/modules/catalyst/target/generic.py b/modules/catalyst/target/generic.py index e0270a52..84865e95 100644 --- a/modules/catalyst/target/generic.py +++ b/modules/catalyst/target/generic.py @@ -24,10 +24,11 @@ class generic_target(catalyst.target.target): self.env={} self.env["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin" - self._arch = self.settings["subarch"] + if 'subarch' in self.settings: + self._arch = self.settings["subarch"] self._rel_type = self.settings["rel_type"] self._version_stamp = self.settings["version_stamp"] - self._media = self.settings["build"] + self._media = "build" self._target = self.get_target_name() def get_target_name(self): -- 2.26.2