Skip to content

repo.py: fix downloading too many APKINDEX files

Administrator requested to merge fix-downloading-too-many-apkindex-files into master

Commit message

In pmb.helpers.repo.alpine_apkindex_path(), default to arch = args.arch_native before calling pmb.helpers.repo.update(). Because otherwise update() defaults to all arches instead of args.arch_native.

This caused the APKINDEX files for all arches to get downloaded, as pmb.chroot.apk_static.init() calls alpine_apkindex_path() without setting arch = args.arch_native explicitly.

How to test

$ sudo rm -v ~/.local/var/pmbootstrap/cache_apk_*/APKINDEX*
$ pmbootstrap build --strict --force hello-world
(downloads x86_64 index)
$ sudo rm -v ~/.local/var/pmbootstrap/cache_apk_*/APKINDEX*
$ pmbootstrap build --strict --force hello-world --arch=armhf
(downloads x86_64, armhf index)

Without this patch, it will always download the indexes for all arches.

Fixes #1736 (closed)

Merge request reports

Loading