Skip to content

Commit 915189d

Browse files
committed
fix sources.py based cross-arch builds
Derive debian_arch from base_arch by default when not set by the user. This ensures that cross-architecture builds correctly download the appropriate binaries, while preserving any explicit user override. Closes-Bug: #2103810 Change-Id: I11b7e19ac3a12147138a98fc1e030767f70b44c9
1 parent ad300f6 commit 915189d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

kolla/common/config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,9 @@ def parse(conf, args, usage=None, prog=None,
392392
openstack_branch_slashed = openstack_branch.replace('-', '/')
393393
conf.set_default('openstack_branch', openstack_branch)
394394
conf.set_default('openstack_branch_slashed', openstack_branch_slashed)
395+
# NOTE(bbezak) Derive debian_arch from base_arch if not set explicitly
396+
derived_arch = 'arm64' if conf.base_arch == 'aarch64' else 'amd64'
397+
conf.set_default('debian_arch', derived_arch)
395398

396399
if not conf.base_image:
397400
conf.base_image = DEFAULT_BASE_TAGS[conf.base]['name']

0 commit comments

Comments
 (0)