repo_missing: fix "could not find aport" error

In pmb.helpers.package.get(), we are differentiating between packages
that do not exist at all, and packages that do not exist for the
specified architecture. Make sure to actuallyy download the foreign arch
APKINDEX files, before trying to find the packages in there. Otherwise
the "could not find aport, and could not find this package in any
APKINDEX" package would appear.

We ran into this when testing on sr.ht, because pmbootstrap runs on a
fresh install every time, where no old APKINDEX files are present
(which would work around the bug).

This was meant to be part of the previous commit already, and was
tested, but it was not submitted correctly. So here it is as separate
commit straight to master. It is trivial anyway.
This commit is contained in:
Oliver Smith 2018-12-03 21:02:18 +01:00
parent 933c4d0f0d
commit 1c10dbee50
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
1 changed files with 2 additions and 0 deletions

View File

@ -29,6 +29,7 @@ import logging
import copy
import pmb.helpers.pmaports
import pmb.helpers.repo
def get(args, pkgname, arch):
@ -69,6 +70,7 @@ def get(args, pkgname, arch):
# Find in APKINDEX (other arches)
if not ret:
pmb.helpers.repo.update(args)
for arch_i in pmb.config.build_device_architectures:
if arch_i != arch:
ret = pmb.parse.apkindex.package(args, pkgname, arch_i, False)