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 08c3c77b authored by Ryan C. Thompson's avatar Ryan C. Thompson Committed by Dimitri Fontaine

Aggressively clear out stale packages before installing

parent 63cf3580
......@@ -520,14 +520,17 @@ PACKAGE may be either a string or the corresponding symbol."
(source (el-get-package-def package))
(method (el-get-package-method source))
(install (el-get-method method :install))
(url (plist-get source :url)))
(when (string= "installed" status)
(error "Package %s is already installed." package))
(when (string= "required" status)
(message "Package %s failed to install, removing it first." package)
(el-get-remove package))
(url (plist-get source :url))
(pdir (el-get-package-directory package)))
(cond ((string= "installed" status)
(error "Package %s is already installed." package))
((string= "required" status)
(message "Package %s failed to install, removing it first." package)
(el-get-remove package))
((file-exists-p pdir)
(message "Package %s has an install dir but is not known to be installed. Removing it so we can install a known version." package)
(el-get-remove package)))
;; check we can install the package and save to "required" status
(el-get-check-init)
......
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