~postmarketos/pmbootstrap

0c0f05caabb919e0a90fb6d74176a2a291bd2893 — Clayton Craft 9 months ago e223fd0
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
1 files changed, 6 insertions(+), 0 deletions(-)

M pmb/parse/_apkbuild.py
M pmb/parse/_apkbuild.py => pmb/parse/_apkbuild.py +6 -0
@@ 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(