From 19b232969d3bd6343651e0791cc0e963a1ffd3de Mon Sep 17 00:00:00 2001 From: Minecrell Date: Mon, 1 Nov 2021 09:50:19 +0100 Subject: [PATCH] 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. --- pmb/helpers/pmaports.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pmb/helpers/pmaports.py b/pmb/helpers/pmaports.py index 22860b84..f6ebd6f7 100644 --- a/pmb/helpers/pmaports.py +++ b/pmb/helpers/pmaports.py @@ -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"]: