Only download APKINDEX for relevant architectures (#1201)

### Only download APKINDEX for relevant architectures
We're downloading the APKINDEX files for all architectures supported by
postmarketOS currently (x86, x86_64, armhf, aarch64). Most of the time,
we only need it for the native and device arch, so this PR reduces the
downloaded files to what is really necessary.

### Intuitive pmbootstrap update logic
* pmb.helpers.repo.update():
  * Default is updating all arches where the APKBUILD files exist
  * Add existing_only parameter
  * Return True when files have been downloaded
  * Properly print which arches will be updated
  * Print update reason only in verbose log
  * Add and improve comments
* pmb.parse.arguments(), update action:
  * Add --non-existing parameter
  * Default for --arch is None (instead of arch.native)
* pmb.helpers.frontend.update():
  * Inform about --non-existing if no APKBUILDs have been updated
This commit is contained in:
Oliver Smith 2018-03-04 13:44:27 +00:00 committed by GitHub
parent e6bb96426b
commit 99127111a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 58 additions and 21 deletions

View file

@ -134,7 +134,8 @@ def init(args, suffix="native"):
"/chroot_native/usr/bin/qemu-" + arch_debian + "-static",
chroot + "/usr/bin/qemu-" + arch_debian + "-static"])
# Install alpine-base (no clean exit for non-native chroot!)
# Install alpine-base
pmb.helpers.repo.update(args, arch)
pmb.chroot.apk_static.run(args, ["--no-progress", "--root", chroot,
"--cache-dir", apk_cache, "--initdb", "--arch", arch,
"add", "alpine-base"])