parse.apkbuild.parse_subpackage: don't inherit pmb_recommends

Reviewed-by: Oliver Smith <ollieparanoid@postmarketos.org>
Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20240102074605.23248-1-clayton@craftyguy.net%3E
This commit is contained in:
Clayton Craft 2024-01-01 23:46:04 -08:00 committed by Oliver Smith
parent e223fd03eb
commit 0c0f05caab
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -271,6 +271,12 @@ def _parse_subpackage(path, lines, apkbuild, subpackages, subpkg):
# Copy variables
apkbuild = apkbuild.copy()
apkbuild["subpkgname"] = subpkgname
# Don't inherit pmb_recommends from the top-level package.
# There are two reasons for this:
# 1) the subpackage may specify its own pmb_recommends
# 2) the top-level package may list the subpackage as a pmb_recommends,
# thereby creating a circular dependency
apkbuild["_pmb_recommends"] = ""
# Parse relevant attributes for the subpackage
_parse_attributes(