diff --git a/pmb/build/_package.py b/pmb/build/_package.py
index 641bc21202c1fba9898c5da813fa0ea39cc2eaf8..3380178e18130c8af586adcad97907ab18e45459 100644
--- a/pmb/build/_package.py
+++ b/pmb/build/_package.py
@@ -276,6 +276,10 @@ def prioritise_build_queue(disarray: list[BuildQueueItem]) -> list[BuildQueueIte
                     raise NonBugError(f"{item['name']}: dependency not found: {dep}")
                 dep = dep_data.pkgname
 
+                # If the dependency is a subpackage we can safely ignore it
+                if dep in item["apkbuild"]["subpackages"]:
+                    continue
+
                 if dep in all_pkgnames:
                     unmet_deps.setdefault(item["name"], []).append(dep)
                     missing_deps = True