core: fix nil :owner on package dependencies

Fixes #2643
This commit is contained in:
syl20bnr 2015-08-13 09:00:18 -04:00
parent a903e6081f
commit 62c6462ae9
1 changed files with 9 additions and 10 deletions

View File

@ -535,13 +535,13 @@ LAYERS is a list of layer symbols."
(defun configuration-layer//install-packages (packages)
"Install PACKAGES."
(interactive)
(let* ((candidates (configuration-layer/filter-packages
packages
(lambda (x) (and (not (null (oref x :owner)))
(not (eq 'local (oref x :location)))
(not (oref x :excluded))))))
(not-installed (configuration-layer//get-uninstalled-packages
(mapcar 'car (object-assoc-list :name candidates))))
(let* ((not-installed
(configuration-layer/filter-packages
packages
(lambda (x) (and (not (null (oref x :owner)))
(not (eq 'local (oref x :location)))
(not (oref x :excluded))
(not (package-installed-p (oref x :name)))))))
(not-installed-count (length not-installed)))
;; installation
(when not-installed
@ -553,10 +553,9 @@ LAYERS is a list of layer symbols."
(spacemacs//redisplay)
(package-refresh-contents)
(setq installed-count 0)
(dolist (pkg-name not-installed)
(dolist (pkg not-installed)
(setq installed-count (1+ installed-count))
(let* ((pkg (object-assoc pkg-name :name
configuration-layer-packages))
(let* ((pkg-name (oref pkg :name))
(layer (oref pkg :owner))
(location (oref pkg :location)))
(spacemacs-buffer/replace-last-line