uninstall: fix dependency check (#30674)
The dependency check currently checks whether there are only build dependencies left for a particular package. However, the database also contains uninstalled packages, which can cause the check to fail. For instance, with `bison` and `flex` having already been uninstalled, `m4` will have the following dependents: ``` bison ('build', 'run')--> m4 flex ('build',)--> m4 libnl ('build',)--> m4 ``` `bison` and `flex` should be ignored in this case because they are not installed anymore. Fixes #30673
This commit is contained in:
parent
bee311edf3
commit
ff03e2ef4c
1 changed files with 1 additions and 1 deletions
|
@ -235,7 +235,7 @@ def is_ready(dag_hash):
|
||||||
|
|
||||||
# If this spec is only used as a build dependency, we can uninstall
|
# If this spec is only used as a build dependency, we can uninstall
|
||||||
return all(
|
return all(
|
||||||
dspec.deptypes == ("build",)
|
dspec.deptypes == ("build",) or not dspec.parent.installed
|
||||||
for dspec in record.spec.edges_from_dependents()
|
for dspec in record.spec.edges_from_dependents()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue