diff --git a/scripts/fastest-infra-wheel-mirror.py b/scripts/fastest-infra-wheel-mirror.py index 7b9ce202fc..49447b8cce 100755 --- a/scripts/fastest-infra-wheel-mirror.py +++ b/scripts/fastest-infra-wheel-mirror.py @@ -131,8 +131,11 @@ numThreads = min(MAX_THREADS, len(MIRROR_LIST)) workQueue = Queue.Queue() for url in MIRROR_LIST: # Build the complete URL - distro = platform.linux_distribution()[0].lower() - version = platform.linux_distribution()[1] + distro = platform.linux_distribution()[0].split(' ')[0].lower() + if distro == 'centos': + version = platform.linux_distribution()[1].split('.')[0] + else: + version = platform.linux_distribution()[1] architecture = platform.machine() fullUrl = url + distro + "-" + version + "-" + architecture + "/" workQueue.put(fullUrl) diff --git a/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 index 7fd053d4e3..2a622b1b9c 100644 --- a/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 +++ b/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 @@ -61,7 +61,7 @@ lxc_net_address: 10.255.255.1 lxc_net_netmask: 255.255.255.0 lxc_net_dhcp_range: 10.255.255.2,10.255.255.253 -{% if repo_build_pip_extra_indexes is defined %} +{% if repo_build_pip_extra_indexes is defined and repo_build_pip_extra_indexes|length > 0 %} ## Wheel mirrors for the repo_build to use repo_build_pip_extra_indexes: {{ repo_build_pip_extra_indexes | to_nice_yaml }}