build: package: queue subpkg depends for base package too (MR 2380)

We handle this correctly for dependencies of the base package but not
the base package itself.... Fix this.

Should avoid duplication here ideally.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-07-21 17:35:36 +02:00
parent e5dc22b838
commit 1fe7b9931c
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -264,6 +264,12 @@ def process_package(
if base_build_status.necessary():
queue_build(base_aports, base_apkbuild, base_depends)
# Also traverse subpackage depends, they shouldn't be included in base_depends since they
# aren't needed for building (and can conflict with depends for other subpackages)
depends += sum(
map(lambda sp: sp["depends"] if sp else [], base_apkbuild["subpackages"].values()), []
)
parent = pkgname
while len(depends):
# FIXME: pop(0) is really quite slow!