helpers: pmaports: Always fall back to parsing all APKBUILDS (MR 2476)

Previously, it would only fall back to parsing all APKBUILDs if a main
package was guessed for this potential subpackage. We do however want to
scan all APKBUILDs in case the package is provided by one of the
packages in pmaports.

Signed-off-by: Jens Reidel <adrian@travitia.xyz>
This commit is contained in:
Jens Reidel 2024-10-07 01:57:41 +02:00
parent 4b4ba1e6ec
commit 822e89ed13
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -222,7 +222,8 @@ def find(package, must_exist=True, subpackages=True, with_extra_repos="default")
# Parse the APKBUILD and verify if the guess was right
if _find_package_in_apkbuild(package, guess / "APKBUILD"):
ret = guess
else:
if not guess or (guess and not ret):
# Otherwise parse all APKBUILDs (takes time!), is the
# package we are looking for a subpackage of any of those?
for path_current in _find_apkbuilds().values():