diff options
-rw-r--r-- | pym/_emerge/__init__.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 9aa8e38e3..50462940d 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -4485,6 +4485,7 @@ class depgraph(object): myuse = pkg.use.enabled jbigkey = pkg depth = pkg.depth + 1 + removal_action = "remove" in self.myparams edepend={} depkeys = ["DEPEND","RDEPEND","PDEPEND"] @@ -4498,7 +4499,8 @@ class depgraph(object): edepend["RDEPEND"] = "" edepend["PDEPEND"] = "" bdeps_satisfied = False - if mytype in ("installed", "binary"): + + if pkg.built and not removal_action: if self.myopts.get("--with-bdeps", "n") == "y": # Pull in build time deps as requested, but marked them as # "satisfied" since they are not strictly required. This allows @@ -4512,6 +4514,9 @@ class depgraph(object): # built packages do not have build time dependencies. edepend["DEPEND"] = "" + if removal_action and self.myopts.get("--with-bdeps", "y") == "n": + edepend["DEPEND"] = "" + deps = ( ("/", edepend["DEPEND"], self._priority(buildtime=True, satisfied=bdeps_satisfied)), @@ -11681,8 +11686,10 @@ def action_depclean(settings, trees, ldpath_mtimes, unresolvable = set() for dep in resolver._initially_unsatisfied_deps: - if isinstance(dep.parent, Package): + if isinstance(dep.parent, Package) and \ + (dep.priority > UnmergeDepPriority.SOFT): unresolvable.add((dep.atom, dep.parent.cpv)) + if not unresolvable: return False |