Revert "pmb.build._package: build depends of subpackages (MR 2292)"

This patch caused a regression[1] that needs to be debugged/fixed, so
reverting in the meantime.

This reverts commit 8b0dfe489a.

1. https://gitlab.com/postmarketOS/pmbootstrap/-/issues/2341
This commit is contained in:
Clayton Craft 2024-04-15 23:29:28 -07:00
parent 8b0dfe489a
commit ca844038f1
No known key found for this signature in database
GPG Key ID: 4A4CED6D7EDF950A
2 changed files with 0 additions and 21 deletions

View File

@ -113,18 +113,6 @@ def get_depends(args, apkbuild):
ret += apkbuild["checkdepends"]
if "ignore_depends" not in args or not args.ignore_depends:
ret += apkbuild["depends"]
# Add depends of subpackages that are inside pmaports, so pmbootstrap
# builds them too. Otherwise we would get an error that a dependency does
# not exist when trying to install the subpackage (pmb#2084).
for subpkgname, subpkg in apkbuild["subpackages"].items():
if not subpkg:
continue
if not getattr(args, "ignore_depends", False):
for dep in subpkg["depends"]:
if pmb.helpers.pmaports.get(args, dep, False):
ret += [dep]
ret = sorted(set(ret))
# Don't recurse forever when a package depends on itself (#948)

View File

@ -137,15 +137,6 @@ def test_get_depends(monkeypatch):
args = args_patched(monkeypatch, ["pmbootstrap", "build", "test"])
assert func(args, apkbuild) == ["a", "b", "c", "e"]
# Depends from subpackage (pmb#2084)
apkbuild["makedepends"] = ["c", "b"]
apkbuild["subpackages"] = {
"d": {
"depends": ["hello-world", "package-does-not-exist-in-pmaports"],
}
}
assert func(args, apkbuild) == ["a", "b", "c", "e", "hello-world"]
def test_build_depends(args, monkeypatch):
# Shortcut and fake apkbuild