diff options
author | David Edmondson <dme@dme.org> | 2020-10-05 18:36:36 +0100 |
---|---|---|
committer | David Edmondson <dme@dme.org> | 2020-10-29 16:27:11 +0000 |
commit | a6eb7b83d77313f9309ec1fac8a7c6f6424ea8e5 (patch) | |
tree | 137ba3a7cb2e522d2dc61aa6ee07b02ecd0b0469 | |
parent | fe4851507c4fbbca6b8fe9355728d029e0586489 (diff) | |
download | vmdb2-a6eb7b83d77313f9309ec1fac8a7c6f6424ea8e5.tar.gz |
feat(qemudebootstrap): Update the target architecture
When using the qemudebootstrap plugin the target architecture is
typically different from the default (that of the host where vmdb2 is
running). Update the state with the target architecture declared in
the qemudebootstrap stage in order that later stages can find it and
behave appropriately.
-rw-r--r-- | vmdb/plugins/qemudebootstrap_plugin.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vmdb/plugins/qemudebootstrap_plugin.py b/vmdb/plugins/qemudebootstrap_plugin.py index 2915cc8..cd36570 100644 --- a/vmdb/plugins/qemudebootstrap_plugin.py +++ b/vmdb/plugins/qemudebootstrap_plugin.py @@ -47,6 +47,10 @@ class QemuDebootstrapStepRunner(vmdb.StepRunnerInterface): components = values["components"] if not (suite and tag and target and mirror and arch): raise Exception("missing arg for qemu-debootstrap step") + # Update the state with the target architecture declared here + # in order that later stages can find it and behave + # appropriately. + state.arch = arch if keyring: vmdb.runcmd( [ @@ -84,4 +88,5 @@ class QemuDebootstrapStepRunner(vmdb.StepRunnerInterface): def run_even_if_skipped(self, values, settings, state): tag = values["target"] target = state.tags.get_builder_mount_point(tag) + state.arch = values["arch"] vmdb.runcmd_chroot(target, ["apt-get", "update"]) |