summaryrefslogtreecommitdiff
path: root/morphlib
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2013-12-20 15:37:40 +0000
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2013-12-20 15:37:40 +0000
commit7593ccef93eed631ea712c716f4e31e9be3a2bf6 (patch)
tree8fc1fc0900dd29bf28c67d504533a148ac42e1b1 /morphlib
parentae0bb5ac1245fe124560fa7dc1f53656da190ac2 (diff)
parent28b186e83095495aa9829bb1b75de28fd7d3d41b (diff)
downloadmorph-7593ccef93eed631ea712c716f4e31e9be3a2bf6.tar.gz
Merge branch 'baserock/pedroalvarez/fix-cross-bootstrap6'
Reviewed-by: Richard Maw
Diffstat (limited to 'morphlib')
-rw-r--r--morphlib/plugins/cross-bootstrap_plugin.py13
-rw-r--r--morphlib/plugins/deploy_plugin.py4
2 files changed, 17 insertions, 0 deletions
diff --git a/morphlib/plugins/cross-bootstrap_plugin.py b/morphlib/plugins/cross-bootstrap_plugin.py
index 72c7924f..ec0cfbcb 100644
--- a/morphlib/plugins/cross-bootstrap_plugin.py
+++ b/morphlib/plugins/cross-bootstrap_plugin.py
@@ -267,6 +267,19 @@ class CrossBootstrapPlugin(cliapp.Plugin):
system_source = srcpool.lookup(root_repo, ref, morph_name)
system_source.morphology.builds_artifacts = builds_artifacts
+ # FIXME: this is a quick fix in order to get it working for
+ # Baserock 13 release, it is not a reasonable fix
+ def validate(self, root_artifact):
+ root_arch = root_artifact.source.morphology['arch']
+ target_arch = arch
+ if root_arch != target_arch:
+ raise morphlib.Error(
+ 'Target architecture is %s '
+ 'but the system architecture is %s'
+ % (target_arch, root_arch))
+
+ morphlib.buildcommand.BuildCommand._validate_architecture = validate
+
system_artifact = build_command.resolve_artifacts(srcpool)
# Calculate build order
diff --git a/morphlib/plugins/deploy_plugin.py b/morphlib/plugins/deploy_plugin.py
index 1e86d44c..47cd00c1 100644
--- a/morphlib/plugins/deploy_plugin.py
+++ b/morphlib/plugins/deploy_plugin.py
@@ -329,6 +329,10 @@ class DeployPlugin(cliapp.Plugin):
morph = system['morph']
srcpool = build_command.create_source_pool(build_repo, ref,
morph + '.morph')
+ def validate(self, root_artifact):
+ pass
+ morphlib.buildcommand.BuildCommand._validate_architecture = validate
+
artifact = build_command.resolve_artifacts(srcpool)
deploy_defaults = system['deploy-defaults']