Ce serveur Gitlab sera éteint le 30 juin 2020, pensez à migrer vos projets vers les serveurs gitlab-research.centralesupelec.fr et gitlab-student.centralesupelec.fr !

Commit a2202e92 authored by Dimitri Fontaine's avatar Dimitri Fontaine

Use our new dependencies tracking code at init time too.

parent 2f017061
......@@ -15,10 +15,11 @@
(require 'cl)
(require 'el-get-core)
(defun el-get-dependencies (package)
(defun el-get-dependencies (packages)
"Return the list of packages to install in order."
(multiple-value-bind (plist all-sorted-p non-sorted)
(topological-sort (el-get-dependencies-graph package))
(apply 'append (mapcar 'el-get-dependencies-graph (el-get-as-list packages))))
(if all-sorted-p
(error "Couldn't sort package dependencies for \"%s\"" package))))
......@@ -611,26 +611,21 @@ considered \"required\"."
(to-init (if packages
(loop for p in packages
when (member (el-get-as-string p) installed)
collect (el-get-as-string p))
(init-deps (loop for p in to-init
append (mapcar 'el-get-as-string
(el-get-as-symbol p)))))
collect p)
(mapcar 'el-get-as-symbol installed)))
(init-deps (el-get-dependencies to-init))
(to-install (if packages
(loop for p in packages
unless (member (el-get-as-string p) to-init)
collect (el-get-as-string p))
unless (member p init-deps)
collect p)
(mapcar 'el-get-as-symbol required)))
(install-deps (el-get-dependencies to-install))
(el-get-verbose-message "el-get-init-and-install: install %S" to-install)
(el-get-verbose-message "el-get-init-and-install: init %S" to-init)
(el-get-verbose-message "el-get-init-and-install: deps %S" init-deps)
(loop for p in to-install do (el-get-install p) collect p into done)
(loop for p in init-deps do (el-get-init p) collect p into done)
(loop for p in to-init
unless (member p done) do (el-get-init p) collect p into done)
(el-get-verbose-message "el-get-init-and-install: install %S" install-deps)
(el-get-verbose-message "el-get-init-and-install: init %S" init-deps)
(loop for p in install-deps do (el-get-do-install p) collect p into done)
(loop for p in init-deps do (el-get-init p) collect p into done)
(defun el-get (&optional sync &rest packages)
......@@ -689,7 +684,7 @@ already installed packages is considered."
;; keep the result of `el-get-init-and-install' to return it even in the
;; 'wait case
(el-get-init-and-install packages)
(el-get-init-and-install (mapcar 'el-get-as-symbol packages))
;; el-get-install is async, that's now ongoing.
(when progress
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment