Skip to content

Commit a7397d5

Browse files
authored
Merge pull request #527 from alganet/mirrors
Allow --qemu and file:// --mirrors to be used together
2 parents f2d7fda + 6e5e423 commit a7397d5

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

rootfs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def create_configuration_file(args):
4141
config.write(f"FINAL_JOBS={args.cores}\n")
4242
config.write(f"INTERNAL_CI={args.internal_ci or False}\n")
4343
config.write(f"INTERACTIVE={args.interactive}\n")
44+
config.write(f"QEMU={args.qemu}\n")
4445
config.write(f"BARE_METAL={args.bare_metal or (args.qemu and args.interactive)}\n")
4546
if (args.bare_metal or args.qemu) and not args.kernel:
4647
if args.repo or args.external_sources:

steps/helpers.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,10 @@ download_source_line() {
283283
fname="${fname:-$(basename "${upstream_url}")}"
284284
if ! [ -e "${fname}" ]; then
285285
for mirror in $(randomize "${MIRRORS}"); do
286+
# In qemu SimpleMirror is not running on the guest os, use qemu IP
287+
case "${QEMU}-${mirror}" in 'True-http://127.0.0.1'*)
288+
mirror="http://10.0.2.2${mirror#'http://127.0.0.1'}"
289+
esac
286290
mirror_url="${mirror}/${fname}"
287291
echo "${mirror_url}"
288292
curl --fail --retry 3 --location "${mirror_url}" --output "${fname}" || true && break

0 commit comments

Comments
 (0)