core: correctly index packages installed by spacemacs core

Function configuration-layer/load-or-install-package now correctly add the
installed packages to indexed-package hash map.
Those packages are put under the special layer `system`.
This commit is contained in:
syl20bnr 2017-01-22 00:34:08 -05:00
parent 9909a95ad3
commit 6dac7d8ce9
1 changed files with 5 additions and 1 deletions

View File

@ -631,9 +631,10 @@ If TOGGLEP is nil then `:toggle' parameter is ignored."
pkg-name (car (oref obj :owners)) layer-name)))
;; last owner wins over the previous one
(object-add-to-list obj :owners layer-name))
;; check consistency betwween package and defined init functions
;; check consistency between package and defined init functions
(unless (or ownerp
(eq 'dotfile layer-name)
(eq 'system layer-name)
(fboundp pre-init-func)
(fboundp post-init-func)
(oref obj :excluded))
@ -2045,6 +2046,9 @@ FILE-TO-LOAD is an explicit file to load after the installation."
(package-install pkg)
(setq pkg-elpa-dir
(configuration-layer/get-elpa-package-install-directory pkg)))
(unless (configuration-layer/get-package pkg)
(let ((obj (configuration-layer/make-package pkg 'system)))
(configuration-layer//add-package obj)))
(require pkg nil 'noerror)
(when file-to-load
(load-file (concat pkg-elpa-dir file-to-load)))