pmb.helpers.pmaports: search for provides in both root and subpackages (MR 2132)

At the moment, "provides" are only checked in the root package and not
in subpackages of APKBUILDs. Fix this by looking through the subpackages
as well.
This commit is contained in:
Minecrell 2021-11-01 09:50:19 +01:00 committed by Oliver Smith
parent 5ed807c064
commit 19b232969d
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
1 changed files with 5 additions and 2 deletions

View File

@ -115,9 +115,12 @@ def _find_package_in_apkbuild(args, package, path):
if package in apkbuild["subpackages"]:
return True
# Search for provides in package
apkbuild_pkgs = [apkbuild]
# Search for provides in both package and subpackages
apkbuild_pkgs = [apkbuild, *apkbuild["subpackages"].values()]
for apkbuild_pkg in apkbuild_pkgs:
if not apkbuild_pkg:
continue
# Provides (cut off before equals sign for entries like
# "mkbootimg=0.0.1")
for provides_i in apkbuild_pkg["provides"]: