diff --git a/pmb/build/_package.py b/pmb/build/_package.py index fc8e6373..bc56553c 100644 --- a/pmb/build/_package.py +++ b/pmb/build/_package.py @@ -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) diff --git a/test/test_build_package.py b/test/test_build_package.py index b8a98fda..f9cc73c5 100644 --- a/test/test_build_package.py +++ b/test/test_build_package.py @@ -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