From ca844038f1d3051866678c6484e67df449c5988c Mon Sep 17 00:00:00 2001 From: Clayton Craft Date: Mon, 15 Apr 2024 23:29:28 -0700 Subject: [PATCH] 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 8b0dfe489abea70875695ccec39e8eb3e434483f. 1. https://gitlab.com/postmarketOS/pmbootstrap/-/issues/2341 --- pmb/build/_package.py | 12 ------------ test/test_build_package.py | 9 --------- 2 files changed, 21 deletions(-) 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