dimitri/el-get — Issue #576: Dependency resolution is still broken in some cases
Author: DarwinAwardWinner
Created: 2012-02-19 00:13:22+00:00
State: open

When a package has multiple dependencies and they are all (or mostly) already installed, the package cannot be installed. Consider package "a" in the test case below:

```lisp
(let ((el-get-default-process-sync t)
(el-get-verbose t)
(el-get-sources
'((:name a
:type builtin
:depends (b c d e f))
(:name b
:type builtin)
(:name c
:type builtin)
(:name d
:type builtin)
(:name e
:type builtin)
(:name f
:type builtin))))
;; Ensure a is uninstalled
(ignore-errors (el-get-remove 'a))
;; Install a and all deps
(el-get-install 'a)
;; Remove a, leaving deps installed
(el-get-remove 'a)
;; Try to install a again, this fails and only inits b and c.
(el-get-install 'a))
```

The test case first ensures that a and all the deps b, c, d, e, and f are installed. Then it uninstalls a and tries to install it again. But this fails, and only the first two dependencies are initialized. It seems like the logic around `el-get-install-next-packages` does not correctly handle dependencies of an uninstalled package that are already installed.