Commit c273d96f authored by Dimitri Fontaine's avatar Dimitri Fontaine

Get rid of el-get-demand1.

parent aec9264c
......@@ -126,20 +126,12 @@ symbol) depends"
(defun el-get-package-initialized-p (package)
(eq (el-get-package-state package) 'init))
(defun el-get-demand1 (package)
"Install, if necessary, and init the el-get package given by
PACKAGE, a symbol"
(let ((p (symbol-name package)))
(if (string= (el-get-package-status p) "installed")
(el-get-init p)
(el-get-do-install p))))
(defun el-get-dependency-installed (package dependency)
"Install the given PACKAGE (a symbol) iff all its dependencies
are now installed"
(when (every 'el-get-package-initialized-p
(el-get-dependencies package))
(el-get-demand1 package)))
(el-get-do-install package)))
(defun el-get-dependency-error (package dependency data)
"Mark PACKAGE as having failed installation due to a failure to
......
......@@ -299,7 +299,7 @@ PACKAGE may be either a string or the corresponding symbol."
(el-get-install dep))
(unless non-installed-dependencies
(el-get-demand1 psym)))))
(el-get-do-install psym)))))
((debug error)
(el-get-installation-failed package err)))))
......@@ -495,6 +495,8 @@ called by `el-get' (usually at startup) for each installed package."
(defun el-get-do-install (package)
"Install any PACKAGE for which you have a recipe."
(el-get-error-unless-package-p package)
(if (string= (el-get-package-status package) "installed")
(el-get-init p)
(let* ((status (el-get-read-package-status package))
(source (el-get-package-def package))
(method (el-get-package-method source))
......@@ -514,7 +516,7 @@ called by `el-get' (usually at startup) for each installed package."
;; and install the package now, *then* message about it
(funcall install package url 'el-get-post-install)
(message "el-get install %s" package)))
(message "el-get install %s" package))))
(defun el-get-post-update (package)
"Post update PACKAGE. This will get run by a sentinel."
......
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