pmb.build._package.build_depends: update APKINDEX

When 'pmbootstrap build' is started with '--no-depends', we make sure
that binary packages of all dependencies exist before proceeding with a
build. Make sure that we have downloaded the APKINDEX for the given arch
first, otherwise this may complain that a binary package is missing
although it does exist.

This happened when using the "native" cross compile method, e.g. when
building kernels for different architectures. It would complain that
there is no binary package for "bash" (which is in Alpine obviously):
https://builds.sr.ht/~postmarketos/job/103882
This commit is contained in:
Oliver Smith 2019-11-04 19:57:24 +01:00
parent dcb89a62e0
commit 46a65e1bb9
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
1 changed files with 1 additions and 0 deletions

View File

@ -143,6 +143,7 @@ def build_depends(args, apkbuild, arch, strict):
# --no-depends: check for binary packages
depends_built = []
if "no_depends" in args and args.no_depends:
pmb.helpers.repo.update(args, arch)
for depend in depends:
if not pmb.parse.apkindex.package(args, depend, arch, False):
raise RuntimeError("Missing binary package for dependency '" +